Introduce RightArrow (->) token in the scanner

This commit is contained in:
Alex Beregszaszi
2020-08-27 12:28:27 +01:00
parent fdc4142b2c
commit 4e5b403c37
9 changed files with 18 additions and 14 deletions
+2 -3
View File
@@ -401,10 +401,9 @@ FunctionDefinition Parser::parseFunctionDefinition()
expectToken(Token::Comma);
}
expectToken(Token::RParen);
if (currentToken() == Token::Sub)
if (currentToken() == Token::RightArrow)
{
expectToken(Token::Sub);
expectToken(Token::GreaterThan);
expectToken(Token::RightArrow);
while (true)
{
funDef.returnVariables.emplace_back(parseTypedName());