diff --git a/trunk_parser/src/ast.rs b/trunk_parser/src/ast.rs index 6f1db28..c82dd21 100644 --- a/trunk_parser/src/ast.rs +++ b/trunk_parser/src/ast.rs @@ -272,6 +272,7 @@ pub enum Expression { AnonymousClass(Option, Vec, Block), Bool(bool), ArrayIndex(Box, Option>), + Null, } #[derive(Debug, Clone, PartialEq, Serialize)] diff --git a/trunk_parser/src/parser/mod.rs b/trunk_parser/src/parser/mod.rs index dfd9ea0..68d629e 100644 --- a/trunk_parser/src/parser/mod.rs +++ b/trunk_parser/src/parser/mod.rs @@ -739,6 +739,10 @@ impl Parser { self.next(); e }, + TokenKind::Null => { + self.next(); + Expression::Null + }, TokenKind::LeftParen => { self.next();