diff options
-rw-r--r-- | libsolidity/ast/AST.h | 5 | ||||
-rw-r--r-- | libsolidity/parsing/Parser.cpp | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 75cb9ab2..b267b6a4 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -1127,9 +1127,10 @@ private: ASTPointer<Expression> m_rightHandSide; }; + /** - * Tuple or just parenthesized expression. - * Examples: (1, 2), (x,), (x), () + * Tuple, parenthesized expression, or bracketed expression. + * Examples: (1, 2), (x,), (x), (), [1, 2], * Individual components might be empty shared pointers (as in the second example). * The respective types in lvalue context are: 2-tuple, 2-tuple (with wildcard), type of x, 0-tuple * Not in lvalue context: 2-tuple, _1_-tuple, type of x, 0-tuple. diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index 5a3ed56e..ba92d2aa 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -1058,6 +1058,7 @@ ASTPointer<Expression> Parser::parsePrimaryExpression() expectToken(oppositeToken); return nodeFactory.createNode<TupleExpression>(components); } + default: if (Token::isElementaryTypeName(token)) { |