diff options
author | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-10-11 05:08:44 +0800 |
---|---|---|
committer | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-10-11 05:08:44 +0800 |
commit | e923a5e190dc26ef2ea062f8d760b5de78d33350 (patch) | |
tree | b754341448df3491e5ffd4d937fafc0676f48a2c /libsolidity | |
parent | f6195c0a462747551ee22aa03ad6c4ad1a9c51bf (diff) | |
download | dexon-solidity-e923a5e190dc26ef2ea062f8d760b5de78d33350.tar dexon-solidity-e923a5e190dc26ef2ea062f8d760b5de78d33350.tar.gz dexon-solidity-e923a5e190dc26ef2ea062f8d760b5de78d33350.tar.bz2 dexon-solidity-e923a5e190dc26ef2ea062f8d760b5de78d33350.tar.lz dexon-solidity-e923a5e190dc26ef2ea062f8d760b5de78d33350.tar.xz dexon-solidity-e923a5e190dc26ef2ea062f8d760b5de78d33350.tar.zst dexon-solidity-e923a5e190dc26ef2ea062f8d760b5de78d33350.zip |
Fix: HexLiteral must be even number of nibbles
solc even allow 0 nibbles:
bytes a = hex"";
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/grammar.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index eb5bc040..83ba2bd7 100644 --- a/libsolidity/grammar.txt +++ b/libsolidity/grammar.txt @@ -84,7 +84,7 @@ 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} '\'') +HexLiteral = 'hex' ('"' ([0-9a-fA-F]{2})* '"' | '\'' ([0-9a-fA-F]{2})* '\'') StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"' Identifier = [a-zA-Z_] [a-zA-Z_0-9]* |