Using for with global binding.

This commit is contained in:
chriseth
2022-03-14 17:39:14 +01:00
parent 7f360e61fc
commit 9188519f11
26 changed files with 307 additions and 6 deletions
+7 -1
View File
@@ -987,9 +987,15 @@ ASTPointer<UsingForDirective> Parser::parseUsingDirective()
advance();
else
typeName = parseTypeName();
bool global = false;
if (m_scanner->currentToken() == Token::Identifier && currentLiteral() == "global")
{
global = true;
advance();
}
nodeFactory.markEndPosition();
expectToken(Token::Semicolon);
return nodeFactory.createNode<UsingForDirective>(move(functions), usesBraces, typeName);
return nodeFactory.createNode<UsingForDirective>(move(functions), usesBraces, typeName, global);
}
ASTPointer<ModifierInvocation> Parser::parseModifierInvocation()