aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar/expressions.rs
blob: c81dc6c35fe2417b30f0053107421c84b17d464e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 => {
            let lit = p.start();
            p.bump();
            lit.complete(p, LITERAL);
            true
        }
        _ => false,
    }
}