Allow event definitions at file level

This commit is contained in:
Kamil Śliwak
2023-09-15 14:47:40 +02:00
parent 020b59680e
commit b0a986ffff
30 changed files with 536 additions and 6 deletions
+3
View File
@@ -131,6 +131,9 @@ ASTPointer<SourceUnit> Parser::parse(CharStream& _charStream)
case Token::Function:
nodes.push_back(parseFunctionDefinition(true));
break;
case Token::Event:
nodes.push_back(parseEventDefinition());
break;
default:
if (
// Workaround because `error` is not a keyword.