aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/event_parser/grammar')
-rw-r--r--src/parser/event_parser/grammar/expressions.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/parser/event_parser/grammar/expressions.rs b/src/parser/event_parser/grammar/expressions.rs
index 9b43bdf2a..a6a1b302b 100644
--- a/src/parser/event_parser/grammar/expressions.rs
+++ b/src/parser/event_parser/grammar/expressions.rs
@@ -1,5 +1,16 @@
1use super::*; 1use super::*;
2 2
3pub(super) fn literal(p: &mut Parser) -> bool { 3pub(super) fn literal(p: &mut Parser) -> bool {
4 p.eat(INT_NUMBER) || p.eat(FLOAT_NUMBER) 4 match p.current() {
5 TRUE_KW | FALSE_KW
6 | INT_NUMBER | FLOAT_NUMBER
7 | BYTE | CHAR
8 |STRING | RAW_STRING | BYTE_STRING | RAW_BYTE_STRING => {
9 node(p, LITERAL, |p| {
10 p.bump();
11 });
12 true
13 }
14 _ => false
15 }
5} \ No newline at end of file 16} \ No newline at end of file