Include actual tokens in custom syntax node.

This commit is contained in:
Stephen Chung
2020-12-13 14:31:24 +08:00
parent 87174de051
commit ecc08271d9
6 changed files with 70 additions and 38 deletions

View File

@@ -95,7 +95,7 @@ fn test_custom_syntax_raw() -> Result<(), Box<EvalAltResult>> {
"hello",
|stream| match stream.len() {
0 => unreachable!(),
1 => Ok(Some("$ident$".to_string())),
1 => Ok(Some("$ident$".into())),
2 => match stream[1].as_str() {
"world" | "kitty" => Ok(None),
s => Err(ParseError(