parser: fix newline checks after statements
since there is no EOL delimiter like ';', we have to check for newline to avoid something like `a = 4 + 4 b = a` also added tests for expr parsing Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
@@ -12,7 +12,7 @@ pub enum Entity {
|
||||
Fn(Fn),
|
||||
Class(Class),
|
||||
Module(Module),
|
||||
Static(Let)
|
||||
Static(Let),
|
||||
}
|
||||
|
||||
/// A module just provides an additional scope
|
||||
@@ -106,7 +106,7 @@ pub enum ElseType {
|
||||
Else(Vec<Statement>),
|
||||
}
|
||||
|
||||
type Op = crate::lexer::TokenSymbol;
|
||||
pub(crate) type Op = crate::lexer::TokenSymbol;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum Literal {
|
||||
|
Reference in New Issue
Block a user