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