Syntax for meta type information.

This commit is contained in:
chriseth
2019-01-17 20:36:48 +01:00
parent 44237211d1
commit 2fcfb216b5
11 changed files with 116 additions and 14 deletions
+6
View File
@@ -1551,6 +1551,12 @@ ASTPointer<Expression> Parser::parsePrimaryExpression()
nodeFactory.markEndPosition();
expression = nodeFactory.createNode<Identifier>(getLiteralAndAdvance());
break;
case Token::Type:
// Inside expressions "type" is the name of a special, globally-available function.
nodeFactory.markEndPosition();
m_scanner->next();
expression = nodeFactory.createNode<Identifier>(make_shared<ASTString>("type"));
break;
case Token::LParen:
case Token::LBrack:
{