diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-15 17:19:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-15 17:19:04 +0800 |
commit | 54e97d1c34d7c291673e695a991db8df627c503e (patch) | |
tree | f41deccafaa7a5b902bf9f0ce08bba072ca697f8 /docs | |
parent | fb5db94879cdd6358d5b8a8a0097aff4b8dd680b (diff) | |
parent | eb73015fd2c93abddef6477190180d04b396973a (diff) | |
download | dexon-solidity-54e97d1c34d7c291673e695a991db8df627c503e.tar dexon-solidity-54e97d1c34d7c291673e695a991db8df627c503e.tar.gz dexon-solidity-54e97d1c34d7c291673e695a991db8df627c503e.tar.bz2 dexon-solidity-54e97d1c34d7c291673e695a991db8df627c503e.tar.lz dexon-solidity-54e97d1c34d7c291673e695a991db8df627c503e.tar.xz dexon-solidity-54e97d1c34d7c291673e695a991db8df627c503e.tar.zst dexon-solidity-54e97d1c34d7c291673e695a991db8df627c503e.zip |
Merge pull request #2402 from ethereum/grammar-updates
Grammar updates (mostly assembly)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/grammar.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/grammar.txt b/docs/grammar.txt index dc188572..09e492f3 100644 --- a/docs/grammar.txt +++ b/docs/grammar.txt @@ -7,7 +7,7 @@ ImportDirective = 'import' StringLiteral ('as' Identifier)? ';' | 'import' ('*' | Identifier) ('as' Identifier)? 'from' StringLiteral ';' | 'import' '{' Identifier ('as' Identifier)? ( ',' Identifier ('as' Identifier)? )* '}' 'from' StringLiteral ';' -ContractDefinition = ( 'contract' | 'library' ) Identifier +ContractDefinition = ( 'contract' | 'library' | 'interface' ) Identifier ( 'is' InheritanceSpecifier (',' InheritanceSpecifier )* )? '{' ContractPart* '}' @@ -62,7 +62,7 @@ WhileStatement = 'while' '(' Expression ')' Statement PlaceholderStatement = '_' SimpleStatement = VariableDefinition | ExpressionStatement ForStatement = 'for' '(' (SimpleStatement)? ';' (Expression)? ';' (ExpressionStatement)? ')' Statement -InlineAssemblyStatement = 'assembly' InlineAssemblyBlock +InlineAssemblyStatement = 'assembly' StringLiteral? InlineAssemblyBlock DoWhileStatement = 'do' Statement 'while' '(' Expression ')' Continue = 'continue' Break = 'break' @@ -137,7 +137,8 @@ Ufixed = 'ufixed' | 'ufixed0x8' | 'ufixed0x16' | 'ufixed0x24' | 'ufixed0x32' | ' InlineAssemblyBlock = '{' AssemblyItem* '}' -AssemblyItem = Identifier | FunctionalAssemblyExpression | InlineAssemblyBlock | AssemblyLocalBinding | AssemblyAssignment | NumberLiteral | StringLiteral | HexLiteral +AssemblyItem = Identifier | FunctionalAssemblyExpression | InlineAssemblyBlock | AssemblyLocalBinding | AssemblyAssignment | AssemblyLabel | NumberLiteral | StringLiteral | HexLiteral AssemblyLocalBinding = 'let' Identifier ':=' FunctionalAssemblyExpression -AssemblyAssignment = Identifier ':=' FunctionalAssemblyExpression | '=:' Identifier +AssemblyAssignment = ( Identifier ':=' FunctionalAssemblyExpression ) | ( '=:' Identifier ) +AssemblyLabel = Identifier ':' FunctionalAssemblyExpression = Identifier '(' AssemblyItem? ( ',' AssemblyItem )* ')' |