From abaee464936a821568c3fdbd52b9aadd3adb6d0f Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Thu, 11 Feb 2021 00:52:25 -0300 Subject: Partially implement VM The following are now implemented: - [x] Arrow - [x] StringKey - [x] RegexKey - [ ] KeySubtree - [ ] ValueSubtree - [x] Ident - [ ] Param - [x] ApplyPredicate - [x] End --- src/parser.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/parser.rs') 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] -- cgit 1.4.1