Return invalid statement if namespace is not followed by an identifier.

This commit is contained in:
Deukhoofd committed 2021-06-05 21:04:33 +02:00
1 parent 43644276bb
commit cf13fa9a90
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -112,6 +112,7 @@ fn parse_namespace(
},
identifier_token.span,
);
return Box::new(ParsedStatement::Invalid);
}
}
reader.consume(TokenType::OpenCurlyBracket, log);
+1 -1
View File
@@ -1,5 +1,5 @@
pub enum ParsedStatement {
Invalid,
Script(Vec<Box<ParsedStatement>>),
Namespace(String, Box<ParsedStatement>),
}