aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/grammar.txt
diff options
context:
space:
mode:
authorNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-19 07:03:41 +0800
committerNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-19 07:03:41 +0800
commitce8a003611024069f797db91723099ecf3c6a834 (patch)
tree4baf6186704124a690b726c4d4d25080027b580e /libsolidity/grammar.txt
parentc396148fe6d86b9f218080db6a4cebeb42d2ca35 (diff)
downloaddexon-solidity-ce8a003611024069f797db91723099ecf3c6a834.tar.gz
dexon-solidity-ce8a003611024069f797db91723099ecf3c6a834.tar.zst
dexon-solidity-ce8a003611024069f797db91723099ecf3c6a834.zip
grammar.txt: Fixes to EnumDef and ArrayTypeName
Diffstat (limited to 'libsolidity/grammar.txt')
-rw-r--r--libsolidity/grammar.txt4
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 |