aboutsummaryrefslogtreecommitdiffstats
path: root/grammar.txt
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-12-12 23:49:26 +0800
committerChristian <c@ethdev.com>2014-12-15 20:05:18 +0800
commit2f64c56ef3a49f7551a708f63c4ed836efce7b73 (patch)
tree6dd2a10b9ef7b0a67206991416dd0a74639f66ea /grammar.txt
parentc8586996059c3d2ae3c7025c2d4247073468ed73 (diff)
downloaddexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.gz
dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.zst
dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.zip
Create contracts.
Diffstat (limited to 'grammar.txt')
-rw-r--r--grammar.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/grammar.txt b/grammar.txt
index c0ab0607..793e9188 100644
--- a/grammar.txt
+++ b/grammar.txt
@@ -25,11 +25,12 @@ Break = 'break' ';'
Return = 'return' Expression? ';'
VariableDefinition = VariableDeclaration ( = Expression )? ';'
-Expression = Assignment | UnaryOperation | BinaryOperation | FunctionCall | IndexAccess |
+Expression = Assignment | UnaryOperation | BinaryOperation | FunctionCall | NewExpression | IndexAccess |
MemberAccess | PrimaryExpression
// The expression syntax is actually much more complicated
Assignment = Expression (AssignmentOp Expression)
FunctionCall = Expression '(' ( Expression ( ',' Expression )* ) ')'
+NewExpression = 'new' Identifier '(' ( Expression ( ',' Expression )* ) ')'
MemberAccess = Expression '.' Identifier
IndexAccess = Expression '[' Expresison ']'
PrimaryExpression = Identifier | NumberLiteral | StringLiteral | ElementaryTypeName | '(' Expression ')'