pub fn successful<'a, I, A>(value: A) -> Parser<'a, I, A>where
I: 'a,
A: Clone + 'a,
Expand description
Returns a Parser representing the successful parsing result.
成功した解析結果を表すParserを返します。
§Example
use oni_comb_parser_rs::prelude::*;
let text: &str = "x";
let input: Vec<char> = text.chars().collect::<Vec<_>>();
let parser: Parser<char, char> = successful('a');
let result: ParseResult<char, char> = parser.parse(&input);
assert!(result.is_success());
assert_eq!(result.success().unwrap(), 'a');