summary refs log tree commit diff stats
path: root/src/parser.rs
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2021-02-11 00:52:25 -0300
committerSoniEx2 <endermoneymod@gmail.com>2021-02-11 00:52:25 -0300
commitabaee464936a821568c3fdbd52b9aadd3adb6d0f (patch)
tree8a8b5c271f0b8b67eeb77e94a68ecf73ffc4e1f9 /src/parser.rs
parent69652efe8ad9738a94fef571c8b81e342f96e7b4 (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.rs9
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]