diff options
author | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-07-19 07:03:41 +0800 |
---|---|---|
committer | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-07-19 07:03:41 +0800 |
commit | ce8a003611024069f797db91723099ecf3c6a834 (patch) | |
tree | 4baf6186704124a690b726c4d4d25080027b580e | |
parent | c396148fe6d86b9f218080db6a4cebeb42d2ca35 (diff) | |
download | dexon-solidity-ce8a003611024069f797db91723099ecf3c6a834.tar.gz dexon-solidity-ce8a003611024069f797db91723099ecf3c6a834.tar.zst dexon-solidity-ce8a003611024069f797db91723099ecf3c6a834.zip |
grammar.txt: Fixes to EnumDef and ArrayTypeName
-rw-r--r-- | libsolidity/grammar.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index 8bfe9f85..d536644c 100644 --- a/libsolidity/grammar.txt +++ b/libsolidity/grammar.txt @@ -13,14 +13,14 @@ FunctionDefinition = 'function' Identifier ParameterList ( 'returns' ParameterList )? Block EnumValue = Identifier -EnumDefinition = 'enum' '{' EnumValue (',' EnumValue)* '}' +EnumDefinition = 'enum' Identifier '{' EnumValue? (',' EnumValue)* '}' ParameterList = '(' ( VariableDeclaration (',' VariableDeclaration)* )? ')' // semantic restriction: mappings and structs (recursively) containing mappings // are not allowed in argument lists VariableDeclaration = TypeName Identifier TypeName = ElementaryTypeName | Identifier | Mapping | ArrayTypeName Mapping = 'mapping' '(' ElementaryTypeName '=>' TypeName ')' -ArrayTypeName = TypeName '[' (Expression)? ']' +ArrayTypeName = TypeName ('[' Expression? ']')+ Block = '{' Statement* '}' Statement = IfStatement | WhileStatement | Block | |