grammar.txt: Move StorageLocation? up to VariableDeclaration

This commit is contained in:
Federico Bond 2017-01-11 00:51:28 -03:00
parent 26a90af4d2
commit d61b911a3a

View File

@ -35,10 +35,10 @@ TypeNameList = '(' ( TypeName (',' TypeName )* )? ')'
// semantic restriction: mappings and structs (recursively) containing mappings
// are not allowed in argument lists
VariableDeclaration = TypeName Identifier
VariableDeclaration = TypeName StorageLocation? Identifier
TypeName = ElementaryTypeName
| UserDefinedTypeName StorageLocation?
| UserDefinedTypeName
| Mapping
| ArrayTypeName
| FunctionTypeName
@ -46,7 +46,7 @@ TypeName = ElementaryTypeName
UserDefinedTypeName = Identifier ( '.' Identifier )*
Mapping = 'mapping' '(' ElementaryTypeName '=>' TypeName ')'
ArrayTypeName = TypeName '[' Expression? ']' StorageLocation?
ArrayTypeName = TypeName '[' Expression? ']'
FunctionTypeName = 'function' TypeNameList ( 'internal' | 'external' | 'constant' | 'payable' )*
( 'returns' TypeNameList )?
StorageLocation = 'memory' | 'storage'