From ea186fe2c073dfd56f834068ee928a9c875b0279 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 8 Jan 2018 21:40:00 +0300 Subject: G: inner attributes --- src/parser/event_parser/grammar/expressions.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/parser/event_parser/grammar/expressions.rs') 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 @@ use super::*; pub(super) fn literal(p: &mut Parser) -> bool { - p.eat(INT_NUMBER) || p.eat(FLOAT_NUMBER) + match p.current() { + TRUE_KW | FALSE_KW + | INT_NUMBER | FLOAT_NUMBER + | BYTE | CHAR + |STRING | RAW_STRING | BYTE_STRING | RAW_BYTE_STRING => { + node(p, LITERAL, |p| { + p.bump(); + }); + true + } + _ => false + } } \ No newline at end of file -- cgit v1.2.3