aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar/expressions.rs
blob: a6a1b302beed77deca9d085963c281200b7caf1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

pub(super) fn literal(p: &mut Parser) -> bool {
    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
    }
}