aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwalter-weinmann <walter.weinmann@gmail.com>2016-09-06 00:58:58 +0800
committerwalter-weinmann <walter.weinmann@gmail.com>2016-09-06 00:58:58 +0800
commit8f233b545f3053982fc4320d820ebb8d732b3a43 (patch)
tree94bbecf9e2b7f351b20f479b385963df9fc17fcd
parente2b787cdd0717bf074cc03634d580f7713568792 (diff)
downloaddexon-solidity-8f233b545f3053982fc4320d820ebb8d732b3a43.tar.gz
dexon-solidity-8f233b545f3053982fc4320d820ebb8d732b3a43.tar.zst
dexon-solidity-8f233b545f3053982fc4320d820ebb8d732b3a43.zip
Changes related to issues #984, #989, #999, #1001 and #1004.
-rw-r--r--libsolidity/grammar.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt
index 86df3db0..969b9e53 100644
--- a/libsolidity/grammar.txt
+++ b/libsolidity/grammar.txt
@@ -43,13 +43,13 @@ StorageLocation = 'memory' | 'storage'
Block = '{' Statement* '}'
Statement = IfStatement | WhileStatement | ForStatement | Block |
( PlaceholderStatement | Continue | Break | Return |
- Throw | SimpleStatement | ExpressionStatement ) ';'
+ Throw | SimpleStatement ) ';'
ExpressionStatement = Expression | VariableDefinition
IfStatement = 'if' '(' Expression ')' Statement ( 'else' Statement )?
WhileStatement = 'while' '(' Expression ')' Statement
PlaceholderStatement = '_'
-SimpleStatement = VariableDefinition | ExpressionStatement
+SimpleStatement = ExpressionStatement
ForStatement = 'for' '(' (SimpleStatement)? ';' (Expression)? ';' (ExpressionStatement)? ')' Statement
Continue = 'continue'
Break = 'break'
@@ -59,7 +59,7 @@ VariableDefinition = VariableDeclaration ( '=' Expression )?
// Precedence by order (see github.com/ethereum/solidity/pull/732)
Expression =
- ( Expression ('++' | '--') | FunctionCall | IndexAccess | MemberAccess | '(' Expression ')' )
+ ( Expression ('++' | '--') | FunctionCall | IndexAccess | MemberAccess | NewExpression | ( TypeName? '(' Expression ')' ) )
| ('!' | '~' | 'delete' | '++' | '--' | '+' | '-') Expression
| Expression '**' Expression
| Expression ('*' | '/' | '%') Expression
@@ -79,7 +79,7 @@ Expression =
PrimaryExpression = Identifier | BooleanLiteral | NumberLiteral | StringLiteral
-FunctionCall = Identifier '(' Expression? ( ',' Expression )* ')'
+FunctionCall = ( Identifier | MemberAccess ) '(' Expression? ( ',' Expression )* ')'
NewExpression = 'new' Identifier
MemberAccess = Expression '.' Identifier
IndexAccess = Expression '[' Expression? ']'