aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorYoichi Hirai <yhirai@pira.jp>2016-09-06 00:28:32 +0800
committerGitHub <noreply@github.com>2016-09-06 00:28:32 +0800
commite2b787cdd0717bf074cc03634d580f7713568792 (patch)
treee743ce24ef9f7eb1df0ada36b79cde685384b8e3 /libsolidity
parentbe6a5f44d7ac4d63eb249988eb8e467fb15f5af4 (diff)
parent3b2174f7a82fec7ed8ef2e55ec00996fac32c948 (diff)
downloaddexon-solidity-e2b787cdd0717bf074cc03634d580f7713568792.tar.gz
dexon-solidity-e2b787cdd0717bf074cc03634d580f7713568792.tar.zst
dexon-solidity-e2b787cdd0717bf074cc03634d580f7713568792.zip
Merge pull request #1005 from ethereum/modifierbody
Require ";" after "_"
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/grammar.txt5
-rw-r--r--libsolidity/parsing/Parser.cpp2
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: