diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-14 05:56:46 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-14 06:16:14 +0800 |
commit | 1e4c93d5d3677c60bd82b9f5592158dc0ad5607a (patch) | |
tree | d999d1c6e2ef6ee0db447327385d4a92fd527e11 /grammar.txt | |
parent | b2575b4bcbd15ec8353a01ae53133f6e71115cce (diff) | |
download | dexon-solidity-1e4c93d5d3677c60bd82b9f5592158dc0ad5607a.tar.gz dexon-solidity-1e4c93d5d3677c60bd82b9f5592158dc0ad5607a.tar.zst dexon-solidity-1e4c93d5d3677c60bd82b9f5592158dc0ad5607a.zip |
adding Enums to grammar.txt
Diffstat (limited to 'grammar.txt')
-rw-r--r-- | grammar.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/grammar.txt b/grammar.txt index 1785b516..5ba0ef23 100644 --- a/grammar.txt +++ b/grammar.txt @@ -1,7 +1,7 @@ ContractDefinition = 'contract' Identifier ( 'is' InheritanceSpecifier (',' InheritanceSpecifier )* )? '{' ContractPart* '}' -ContractPart = StateVariableDeclaration | StructDefinition | ModifierDefinition | FunctionDefinition +ContractPart = StateVariableDeclaration | StructDefinition | ModifierDefinition | FunctionDefinition | EnumDefinition InheritanceSpecifier = Identifier ( '(' Expression ( ',' Expression )* ')' )? StructDefinition = 'struct' Identifier '{' @@ -11,6 +11,9 @@ ModifierDefinition = 'modifier' Identifier ParameterList? Block FunctionDefinition = 'function' Identifier ParameterList ( Identifier | 'constant' | 'public' | 'protected' | 'private' )* ( 'returns' ParameterList )? Block + +EnumValue = Identifier +EnumDefinition = 'enum' '{' EnumValue (',' EnumValue)* '}' ';' ParameterList = '(' ( VariableDeclaration (',' VariableDeclaration)* )? ')' // semantic restriction: mappings and structs (recursively) containing mappings // are not allowed in argument lists |