aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/grammar.txt
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-10-11 05:41:55 +0800
committerGitHub <noreply@github.com>2016-10-11 05:41:55 +0800
commitd3f410d8a89aaa042ff264d7a0ea79184e01abab (patch)
tree621176b0cbef50ec55322ba6aef8ed0a82ea0b34 /libsolidity/grammar.txt
parentfa6c20e81c46ecc05775391c44ca918299746f21 (diff)
parente923a5e190dc26ef2ea062f8d760b5de78d33350 (diff)
downloaddexon-solidity-d3f410d8a89aaa042ff264d7a0ea79184e01abab.tar.gz
dexon-solidity-d3f410d8a89aaa042ff264d7a0ea79184e01abab.tar.zst
dexon-solidity-d3f410d8a89aaa042ff264d7a0ea79184e01abab.zip
Merge pull request #1189 from NicolaiSoeborg/develop
Add HexLiteral to grammar, fixes #1186
Diffstat (limited to 'libsolidity/grammar.txt')
-rw-r--r--libsolidity/grammar.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt
index 755cf281..d84ee10c 100644
--- a/libsolidity/grammar.txt
+++ b/libsolidity/grammar.txt
@@ -77,7 +77,7 @@ Expression =
| Expression? (',' Expression)
| PrimaryExpression
-PrimaryExpression = Identifier | BooleanLiteral | NumberLiteral | StringLiteral
+PrimaryExpression = Identifier | BooleanLiteral | NumberLiteral | HexLiteral | StringLiteral
FunctionCall = ( PrimaryExpression | NewExpression | TypeName ) ( ( '.' Identifier ) | ( '[' Expression ']' ) )* '(' Expression? ( ',' Expression )* ')'
NewExpression = 'new' Identifier
@@ -88,8 +88,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]{2})* '"' | '\'' ([0-9a-fA-F]{2})* '\'')
StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"'
-
Identifier = [a-zA-Z_] [a-zA-Z_0-9]*
ElementaryTypeName = 'address' | 'bool' | 'string' | 'var'