diff options
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/grammar.txt | 5 | ||||
-rw-r--r-- | libsolidity/parsing/Parser.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index 0230729a..86df3db0 100644 --- a/libsolidity/grammar.txt +++ b/libsolidity/grammar.txt @@ -41,8 +41,9 @@ ArrayTypeName = TypeName StorageLocation? '[' Expression? ']' StorageLocation = 'memory' | 'storage' Block = '{' Statement* '}' -Statement = IfStatement | WhileStatement | ForStatement | Block | PlaceholderStatement | - ( Continue | Break | Return | Throw | SimpleStatement | ExpressionStatement ) ';' +Statement = IfStatement | WhileStatement | ForStatement | Block | + ( PlaceholderStatement | Continue | Break | Return | + Throw | SimpleStatement | ExpressionStatement ) ';' ExpressionStatement = Expression | VariableDefinition IfStatement = 'if' '(' Expression ')' Statement ( 'else' Statement )? diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index b2f4a156..1bffa5d7 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -753,7 +753,7 @@ ASTPointer<Statement> Parser::parseStatement() { statement = ASTNodeFactory(*this).createNode<PlaceholderStatement>(docString); m_scanner->next(); - return statement; + break; } // fall-through default: |