aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorNicolai <NicolaiSoeborg@users.noreply.github.com>2016-10-11 05:08:44 +0800
committerNicolai <NicolaiSoeborg@users.noreply.github.com>2016-10-11 05:08:44 +0800
commite923a5e190dc26ef2ea062f8d760b5de78d33350 (patch)
treeb754341448df3491e5ffd4d937fafc0676f48a2c /libsolidity
parentf6195c0a462747551ee22aa03ad6c4ad1a9c51bf (diff)
downloaddexon-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.txt2
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]*