diff options
author | Aleksey Kladov <[email protected]> | 2018-01-08 18:40:00 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-01-08 18:40:00 +0000 |
commit | ea186fe2c073dfd56f834068ee928a9c875b0279 (patch) | |
tree | 8c3d8c12b04f95691f2140190a970199ad7c0a39 /src/parser/event_parser | |
parent | f25142c5edc579c7f7030c03c2673db238255bb2 (diff) |
G: inner attributes
Diffstat (limited to 'src/parser/event_parser')
-rw-r--r-- | src/parser/event_parser/grammar/expressions.rs | 13 |
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 @@ | |||
1 | use super::*; | 1 | use super::*; |
2 | 2 | ||
3 | pub(super) fn literal(p: &mut Parser) -> bool { | 3 | pub(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 |