mirror of
https://github.com/danog/parser.git
synced 2024-11-27 04:14:55 +01:00
parser: support null constant
This commit is contained in:
parent
a6fc1b58f1
commit
151e0d90c3
@ -272,6 +272,7 @@ pub enum Expression {
|
||||
AnonymousClass(Option<Identifier>, Vec<Identifier>, Block),
|
||||
Bool(bool),
|
||||
ArrayIndex(Box<Self>, Option<Box<Self>>),
|
||||
Null,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
||||
|
@ -739,6 +739,10 @@ impl Parser {
|
||||
self.next();
|
||||
e
|
||||
},
|
||||
TokenKind::Null => {
|
||||
self.next();
|
||||
Expression::Null
|
||||
},
|
||||
TokenKind::LeftParen => {
|
||||
self.next();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user