From 41647fd75f3c131ecade223fc58a1f6eed2ee235 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Fri, 13 Feb 2015 23:47:55 +0100 Subject: [PATCH] Removing ';' from the end of EnumDefinition --- Parser.cpp | 1 - grammar.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Parser.cpp b/Parser.cpp index 4277ef54f..c96593f64 100644 --- a/Parser.cpp +++ b/Parser.cpp @@ -293,7 +293,6 @@ ASTPointer Parser::parseEnumDefinition() nodeFactory.markEndPosition(); expectToken(Token::RBrace); - expectToken(Token::Semicolon); return nodeFactory.createNode(name, members); } diff --git a/grammar.txt b/grammar.txt index 5ba0ef238..5e6e65f85 100644 --- a/grammar.txt +++ b/grammar.txt @@ -13,7 +13,7 @@ FunctionDefinition = 'function' Identifier ParameterList ( 'returns' ParameterList )? Block EnumValue = Identifier -EnumDefinition = 'enum' '{' EnumValue (',' EnumValue)* '}' ';' +EnumDefinition = 'enum' '{' EnumValue (',' EnumValue)* '}' ParameterList = '(' ( VariableDeclaration (',' VariableDeclaration)* )? ')' // semantic restriction: mappings and structs (recursively) containing mappings // are not allowed in argument lists