rust/src/parser/event_parser/grammar/expressions.rs

17 lines
369 B
Rust
Raw Normal View History

2018-01-07 19:46:10 +01:00
use super::*;
pub(super) fn literal(p: &mut Parser) -> bool {
2018-01-20 19:49:58 +01:00
match p.current() {
TRUE_KW | FALSE_KW |
INT_NUMBER | FLOAT_NUMBER |
BYTE | CHAR |
STRING | RAW_STRING | BYTE_STRING | RAW_BYTE_STRING => {
p.start(LITERAL);
p.bump();
p.finish();
true
}
_ => false
}
}