diff options
author | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-07-20 23:07:26 +0800 |
---|---|---|
committer | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-07-20 23:07:26 +0800 |
commit | e1c69b11f48ce6cd45edad437d403ba5a396d3c0 (patch) | |
tree | 0cee2b52f4a724abd195cf6789a15bb9a85d9f5c /libsolidity | |
parent | 9324393975dcff5eb8ae4ae217b3a4d27126416d (diff) | |
download | dexon-solidity-e1c69b11f48ce6cd45edad437d403ba5a396d3c0.tar.gz dexon-solidity-e1c69b11f48ce6cd45edad437d403ba5a396d3c0.tar.zst dexon-solidity-e1c69b11f48ce6cd45edad437d403ba5a396d3c0.zip |
Fix missing 'ether' from NumberUnit. Extend StringLiteral syntax
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/grammar.txt | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index 2b160440..60c716b9 100644 --- a/libsolidity/grammar.txt +++ b/libsolidity/grammar.txt @@ -16,7 +16,6 @@ ModifierDefinition = 'modifier' Identifier ParameterList? Block FunctionDefinition = 'function' Identifier ParameterList ( Identifier | 'constant' | 'external' | 'public' | 'internal' | 'private' )* ( 'returns' (ParameterList | TypeParameterList) )? Block - EventDefinition = 'event' Identifier (ParameterList | TypeParameterList) ';' EnumValue = Identifier @@ -63,11 +62,10 @@ PrimaryExpression = Identifier | BooleanLiteral | NumberLiteral | StringLiteral BooleanLiteral = 'true' | 'false' NumberLiteral = '0x'? [0-9]+ NumberUnit? -StringLiteral = '"' [a-zA-Z_0-9]* '"' -Identifier = [a-zA-Z_] [a-zA-Z_0-9]* - -NumberUnit = 'wei' | 'szabo' | 'finney' +NumberUnit = 'wei' | 'szabo' | 'finney' | 'ether' | 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'years' +StringLiteral = '"' (~('"' | '\\' | '\r' | '\n') | '\\' ('"' | '\\'))* '"'; +Identifier = [a-zA-Z_] [a-zA-Z_0-9]* ElementaryTypeName = 'address' | 'bool' | 'string' | 'var' | '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' |