mirror of
https://github.com/danog/parser.git
synced 2024-11-30 04:29:13 +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),
|
AnonymousClass(Option<Identifier>, Vec<Identifier>, Block),
|
||||||
Bool(bool),
|
Bool(bool),
|
||||||
ArrayIndex(Box<Self>, Option<Box<Self>>),
|
ArrayIndex(Box<Self>, Option<Box<Self>>),
|
||||||
|
Null,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize)]
|
||||||
|
@ -739,6 +739,10 @@ impl Parser {
|
|||||||
self.next();
|
self.next();
|
||||||
e
|
e
|
||||||
},
|
},
|
||||||
|
TokenKind::Null => {
|
||||||
|
self.next();
|
||||||
|
Expression::Null
|
||||||
|
},
|
||||||
TokenKind::LeftParen => {
|
TokenKind::LeftParen => {
|
||||||
self.next();
|
self.next();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user