From 02984b8de11a9dc6ab88788bfae82530b073f1f6 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 5 Sep 2016 14:54:50 +0200 Subject: Require ";" after "_" --- libsolidity/parsing/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity') 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 Parser::parseStatement() { statement = ASTNodeFactory(*this).createNode(docString); m_scanner->next(); - return statement; + break; } // fall-through default: -- cgit From 3b2174f7a82fec7ed8ef2e55ec00996fac32c948 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 5 Sep 2016 16:13:31 +0200 Subject: Update grammar.txt to reflect the change. --- libsolidity/grammar.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libsolidity') 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 )? -- cgit