parser: support null constant

This commit is contained in:
Ryan Chandler 2022-07-28 15:53:47 +01:00
parent a6fc1b58f1
commit 151e0d90c3
No known key found for this signature in database
GPG Key ID: F113BCADDB3B0CCA
2 changed files with 5 additions and 0 deletions

View File

@ -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)]

View File

@ -739,6 +739,10 @@ impl Parser {
self.next();
e
},
TokenKind::Null => {
self.next();
Expression::Null
},
TokenKind::LeftParen => {
self.next();