diff options
author | chriseth <c@ethdev.com> | 2016-11-08 18:48:28 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-11-16 21:37:18 +0800 |
commit | 5011d6339a185a55d6cdc3e952dea7bdd14a2ff7 (patch) | |
tree | 86e4c7b54f0befbc903051654c7b128d9f9b052d /libsolidity/grammar.txt | |
parent | 0e5507c78c5b1602ff0f9e5530ab05f0a35ecc0d (diff) | |
download | dexon-solidity-5011d6339a185a55d6cdc3e952dea7bdd14a2ff7.tar dexon-solidity-5011d6339a185a55d6cdc3e952dea7bdd14a2ff7.tar.gz dexon-solidity-5011d6339a185a55d6cdc3e952dea7bdd14a2ff7.tar.bz2 dexon-solidity-5011d6339a185a55d6cdc3e952dea7bdd14a2ff7.tar.lz dexon-solidity-5011d6339a185a55d6cdc3e952dea7bdd14a2ff7.tar.xz dexon-solidity-5011d6339a185a55d6cdc3e952dea7bdd14a2ff7.tar.zst dexon-solidity-5011d6339a185a55d6cdc3e952dea7bdd14a2ff7.zip |
Added function types to the grammar.
Diffstat (limited to 'libsolidity/grammar.txt')
-rw-r--r-- | libsolidity/grammar.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index 6ad8994a..cfa779ec 100644 --- a/libsolidity/grammar.txt +++ b/libsolidity/grammar.txt @@ -31,13 +31,16 @@ EnumDefinition = 'enum' Identifier '{' EnumValue? (',' EnumValue)* '}' IndexedParameterList = '(' ( TypeName 'indexed'? Identifier? (',' TypeName 'indexed'? Identifier?)* )? ')' ParameterList = '(' ( TypeName Identifier? (',' TypeName Identifier?)* )? ')' +TypeNameList = '(' ( TypeName (',' TypeName )* )? ')' // semantic restriction: mappings and structs (recursively) containing mappings // are not allowed in argument lists VariableDeclaration = TypeName Identifier -TypeName = ElementaryTypeName | Identifier StorageLocation? | Mapping | ArrayTypeName +TypeName = ElementaryTypeName | Identifier StorageLocation? | Mapping | ArrayTypeName | FunctionTypeName Mapping = 'mapping' '(' ElementaryTypeName '=>' TypeName ')' ArrayTypeName = TypeName StorageLocation? '[' Expression? ']' +FunctionTypeName = 'function' TypeNameList ( 'internal' | 'external' | 'constant' )* + ( 'returns' TypeNameList )? StorageLocation = 'memory' | 'storage' Block = '{' Statement* '}' |