diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2021-02-11 00:52:25 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2021-02-11 00:52:25 -0300 |
commit | abaee464936a821568c3fdbd52b9aadd3adb6d0f (patch) | |
tree | 8a8b5c271f0b8b67eeb77e94a68ecf73ffc4e1f9 /src/parser.rs | |
parent | 69652efe8ad9738a94fef571c8b81e342f96e7b4 (diff) |
Partially implement VM
The following are now implemented: - [x] Arrow - [x] StringKey - [x] RegexKey - [ ] KeySubtree - [ ] ValueSubtree - [x] Ident - [ ] Param - [x] ApplyPredicate - [x] End
Diffstat (limited to 'src/parser.rs')
-rw-r--r-- | src/parser.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/parser.rs b/src/parser.rs index 00fbcb1..eb54c86 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -623,6 +623,15 @@ mod tests { ) -> bool { false } + + fn as_str<'b>( + item: RefOwn<'b, Self::Ref, Self::Own> + ) -> Option<&'b str> { + match item { + RefOwn::Str(key) => Some(key), + _ => None, + } + } } #[test] |