diff options
author | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-07-26 21:44:22 +0800 |
---|---|---|
committer | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-07-26 21:44:22 +0800 |
commit | e584a8396a3293641d3b9eb0019ceee11cebf892 (patch) | |
tree | 175404c0b1ca48f08fc0d7d138041c3126f44d81 /libsolidity/grammar.txt | |
parent | 30090645332e9434ee7d804117e6957ef75767fc (diff) | |
download | dexon-solidity-e584a8396a3293641d3b9eb0019ceee11cebf892.tar.gz dexon-solidity-e584a8396a3293641d3b9eb0019ceee11cebf892.tar.zst dexon-solidity-e584a8396a3293641d3b9eb0019ceee11cebf892.zip |
Remove assignment as expr. Add functionCall as primaryExpression
Diffstat (limited to 'libsolidity/grammar.txt')
-rw-r--r-- | libsolidity/grammar.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index 18f9637b..9678d538 100644 --- a/libsolidity/grammar.txt +++ b/libsolidity/grammar.txt @@ -18,7 +18,7 @@ StructDefinition = 'struct' Identifier '{' ( VariableDeclaration ';' (VariableDeclaration ';')* )? '}' ModifierDefinition = 'modifier' Identifier ParameterList? Block FunctionDefinition = 'function' Identifier ParameterList - ( FunctionCall | 'constant' | 'external' | 'public' | 'internal' | 'private' )* + ( FunctionCall | Identifier | 'constant' | 'external' | 'public' | 'internal' | 'private' )* ( 'returns' (ParameterList | TypeParameterList) )? Block EventDefinition = 'event' Identifier (ParameterList | TypeParameterList | IndexedTypeParameterList) 'anonymous'? ';' @@ -30,7 +30,7 @@ TypeParameterList = '(' ( TypeName (',' TypeName)* )? ')' ParameterList = '(' ( VariableDeclaration (',' VariableDeclaration)* )? ')' // semantic restriction: mappings and structs (recursively) containing mappings // are not allowed in argument lists -VariableDeclaration = TypeName Identifier +VariableDeclaration = TypeName Identifier | 'var' assignment TypeName = ElementaryTypeName | Identifier StorageLocation? | Mapping | ArrayTypeName Mapping = 'mapping' '(' ElementaryTypeName '=>' TypeName ')' ArrayTypeName = TypeName StorageLocation? '[' Expression? ']' @@ -69,11 +69,11 @@ Expression = | Expression '&&' Expression | Expression '||' Expression | Expression '?' Expression ':' Expression - | Expression ('=' | '|=' | '^=' | '&=' | '<<=' | '/=' | '%=') Expression - | Expression ',' Expression +/* | Expression ('=' | '|=' | '^=' | '&=' | '<<=' | '/=' | '%=') Expression */ + | Expression ',' Expression? | PrimaryExpression -PrimaryExpression = Identifier | BooleanLiteral | NumberLiteral | StringLiteral +PrimaryExpression = Identifier | BooleanLiteral | NumberLiteral | StringLiteral | FunctionCall FunctionCall = Identifier '(' Expression? ( ',' Expression )* ')' NewExpression = 'new' Identifier @@ -88,7 +88,7 @@ StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"' Identifier = [a-zA-Z_] [a-zA-Z_0-9]* -ElementaryTypeName = 'address' | 'bool' | 'string' | 'var' +ElementaryTypeName = 'address' | 'bool' | 'string' | 'int' | 'int8' | 'int16' | 'int24' | 'int32' | 'int40' | 'int48' | 'int56' | 'int64' | 'int72' | 'int80' | 'int88' | 'int96' | 'int104' | 'int112' | 'int120' | 'int128' | 'int136' | 'int144' | 'int152' | 'int160' | 'int168' | 'int176' | 'int184' | 'int192' | 'int200' | 'int208' | 'int216' | 'int224' | 'int232' | 'int240' | 'int248' | 'int256' | 'uint' | 'uint8' | 'uint16' | 'uint24' | 'uint32' | 'uint40' | 'uint48' | 'uint56' | 'uint64' | 'uint72' | 'uint80' | 'uint88' | 'uint96' | 'uint104' | 'uint112' | 'uint120' | 'uint128' | 'uint136' | 'uint144' | 'uint152' | 'uint160' | 'uint168' | 'uint176' | 'uint184' | 'uint192' | 'uint200' | 'uint208' | 'uint216' | 'uint224' | 'uint232' | 'uint240' | 'uint248' | 'uint256' | 'byte' | 'bytes' | 'bytes1' | 'bytes2' | 'bytes3' | 'bytes4' | 'bytes5' | 'bytes6' | 'bytes7' | 'bytes8' | 'bytes9' | 'bytes10' | 'bytes11' | 'bytes12' | 'bytes13' | 'bytes14' | 'bytes15' | 'bytes16' | 'bytes17' | 'bytes18' | 'bytes19' | 'bytes20' | 'bytes21' | 'bytes22' | 'bytes23' | 'bytes24' | 'bytes25' | 'bytes26' | 'bytes27' | 'bytes28' | 'bytes29' | 'bytes30' | 'bytes31' | 'bytes32' |