diff options
author | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-10-11 01:42:42 +0800 |
---|---|---|
committer | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-10-11 01:42:42 +0800 |
commit | f6195c0a462747551ee22aa03ad6c4ad1a9c51bf (patch) | |
tree | 2a126401885aad4dbce7f3c60d5335201ab4e4f0 | |
parent | 399e1fe70cc82092034818acb35ae0c8ed5d01c2 (diff) | |
download | dexon-solidity-f6195c0a462747551ee22aa03ad6c4ad1a9c51bf.tar dexon-solidity-f6195c0a462747551ee22aa03ad6c4ad1a9c51bf.tar.gz dexon-solidity-f6195c0a462747551ee22aa03ad6c4ad1a9c51bf.tar.bz2 dexon-solidity-f6195c0a462747551ee22aa03ad6c4ad1a9c51bf.tar.lz dexon-solidity-f6195c0a462747551ee22aa03ad6c4ad1a9c51bf.tar.xz dexon-solidity-f6195c0a462747551ee22aa03ad6c4ad1a9c51bf.tar.zst dexon-solidity-f6195c0a462747551ee22aa03ad6c4ad1a9c51bf.zip |
Add HexLiteral to grammar, fixes #1186
-rw-r--r-- | libsolidity/grammar.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index 6d92fc59..eb5bc040 100644 --- a/libsolidity/grammar.txt +++ b/libsolidity/grammar.txt @@ -73,7 +73,7 @@ Expression = | Expression? (',' Expression) | PrimaryExpression -PrimaryExpression = Identifier | BooleanLiteral | NumberLiteral | StringLiteral +PrimaryExpression = Identifier | BooleanLiteral | NumberLiteral | HexLiteral | StringLiteral FunctionCall = Identifier '(' Expression? ( ',' Expression )* ')' NewExpression = 'new' Identifier @@ -84,8 +84,8 @@ BooleanLiteral = 'true' | 'false' NumberLiteral = '0x'? [0-9]+ (' ' NumberUnit)? NumberUnit = 'wei' | 'szabo' | 'finney' | 'ether' | 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'years' +HexLiteral = 'hex' ('"' [0-9a-fA-F]{8} '"' | '\'' [0-9a-fA-F]{8} '\'') StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"' - Identifier = [a-zA-Z_] [a-zA-Z_0-9]* ElementaryTypeName = 'address' | 'bool' | 'string' | 'var' |