diff options
author | Christian <c@ethdev.com> | 2015-01-22 08:02:38 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-26 17:23:39 +0800 |
commit | 941c77c8fadd6195809cd2d572feb64478c4fb20 (patch) | |
tree | a4de3710aff5f3f2d9423565fd0e9ecc8708b5bf /grammar.txt | |
parent | 19793dab093ae36b5f2b4d1cabfbf54bed3125b1 (diff) | |
download | dexon-solidity-941c77c8fadd6195809cd2d572feb64478c4fb20.tar.gz dexon-solidity-941c77c8fadd6195809cd2d572feb64478c4fb20.tar.zst dexon-solidity-941c77c8fadd6195809cd2d572feb64478c4fb20.zip |
Type resolution for function modifiers.
Diffstat (limited to 'grammar.txt')
-rw-r--r-- | grammar.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/grammar.txt b/grammar.txt index 11d99854..b97dac5d 100644 --- a/grammar.txt +++ b/grammar.txt @@ -1,14 +1,14 @@ ContractDefinition = 'contract' Identifier ( 'is' InheritanceSpecifier (',' InheritanceSpecifier )* )? '{' ContractPart* '}' -ContractPart = VariableDeclaration ';' | StructDefinition | +ContractPart = VariableDeclaration ';' | StructDefinition | ModifierDefinition | FunctionDefinition | 'public:' | 'private:' InheritanceSpecifier = Identifier ( '(' Expression ( ',' Expression )* ')' )? StructDefinition = 'struct' Identifier '{' ( VariableDeclaration (';' VariableDeclaration)* )? '} - -FunctionDefinition = 'function' Identifier ParameterList 'const'? +ModifierDefinition = 'modifier' Identifier ParameterList? Block +FunctionDefinition = 'function' Identifier ParameterList ( Identifier | 'constant' )* ( 'returns' ParameterList )? Block ParameterList = '(' ( VariableDeclaration (',' VariableDeclaration)* )? ')' // semantic restriction: mappings and structs (recursively) containing mappings |