aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorFederico Bond <federicobond@gmail.com>2017-06-20 04:16:45 +0800
committerFederico Bond <federicobond@gmail.com>2017-06-20 04:16:45 +0800
commit1e3b45d61ee4dc51c3e787a5d981f588e2cb3ecf (patch)
tree371dcf51b049560c58b2398050bd3359a8aa1c86 /docs
parent26ea9ce07cf85849cd881465a4322f14bff87eb8 (diff)
downloaddexon-solidity-1e3b45d61ee4dc51c3e787a5d981f588e2cb3ecf.tar
dexon-solidity-1e3b45d61ee4dc51c3e787a5d981f588e2cb3ecf.tar.gz
dexon-solidity-1e3b45d61ee4dc51c3e787a5d981f588e2cb3ecf.tar.bz2
dexon-solidity-1e3b45d61ee4dc51c3e787a5d981f588e2cb3ecf.tar.lz
dexon-solidity-1e3b45d61ee4dc51c3e787a5d981f588e2cb3ecf.tar.xz
dexon-solidity-1e3b45d61ee4dc51c3e787a5d981f588e2cb3ecf.tar.zst
dexon-solidity-1e3b45d61ee4dc51c3e787a5d981f588e2cb3ecf.zip
Fix grammar for tuple expressions
Diffstat (limited to 'docs')
-rw-r--r--docs/grammar.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/grammar.txt b/docs/grammar.txt
index 09e492f3..b38b7ffa 100644
--- a/docs/grammar.txt
+++ b/docs/grammar.txt
@@ -88,7 +88,6 @@ Expression =
| Expression '||' Expression
| Expression '?' Expression ':' Expression
| Expression ('=' | '|=' | '^=' | '&=' | '<<=' | '>>=' | '+=' | '-=' | '*=' | '/=' | '%=') Expression
- | Expression? (',' Expression)
| PrimaryExpression
PrimaryExpression = Identifier
@@ -96,6 +95,7 @@ PrimaryExpression = Identifier
| NumberLiteral
| HexLiteral
| StringLiteral
+ | TupleExpression
| ElementaryTypeNameExpression
ExpressionList = Expression ( ',' Expression )*
@@ -120,6 +120,9 @@ Identifier = [a-zA-Z_$] [a-zA-Z_$0-9]*
HexNumber = '0x' [0-9a-fA-F]+
DecimalNumber = [0-9]+
+TupleExpression = '(' ( Expression ( ',' Expression )* )? ')'
+ | '[' ( Expression ( ',' Expression )* )? ']'
+
ElementaryTypeNameExpression = ElementaryTypeName
ElementaryTypeName = 'address' | 'bool' | 'string' | 'var'