updated attempt...still a bit more work to do but here's what's current

This commit is contained in:
RJ Catalano 2015-12-15 11:00:35 -06:00
commit 84241804dc
2 changed files with 4 additions and 2 deletions

View File

@ -1127,9 +1127,10 @@ private:
ASTPointer<Expression> m_rightHandSide; ASTPointer<Expression> m_rightHandSide;
}; };
/** /**
* Tuple or just parenthesized expression. * Tuple, parenthesized expression, or bracketed expression.
* Examples: (1, 2), (x,), (x), () * Examples: (1, 2), (x,), (x), (), [1, 2],
* Individual components might be empty shared pointers (as in the second example). * 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 * 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. * Not in lvalue context: 2-tuple, _1_-tuple, type of x, 0-tuple.

View File

@ -1058,6 +1058,7 @@ ASTPointer<Expression> Parser::parsePrimaryExpression()
expectToken(oppositeToken); expectToken(oppositeToken);
return nodeFactory.createNode<TupleExpression>(components); return nodeFactory.createNode<TupleExpression>(components);
} }
default: default:
if (Token::isElementaryTypeName(token)) if (Token::isElementaryTypeName(token))
{ {