1
0

Fix to fix

This commit is contained in:
otya128
2016-12-24 14:03:36 +09:00
parent d7f4ae0888
commit d10e610796

View File

@@ -945,21 +945,10 @@ class Parser
while(true) while(true)
{ {
token = lex.front(); token = lex.front();
auto expr = expression();
if(expr || oldcomma || lex.front.type == TokenType.Comma)//if(expr)
func.addArg(expr);
if(token.type == TokenType.Comma)
{
func.addArg(new VoidExpression(lex.location));
lex.popFront();
token = lex.front();
if (token.type != TokenType.Comma)
func.addArg(new VoidExpression(lex.location));
}
else
{
auto expr = expression();
if(expr || oldcomma || lex.front.type == TokenType.Comma)//if(expr)
func.addArg(expr);
}
if(lex.front().type == TokenType.Out) break; if(lex.front().type == TokenType.Out) break;
if(lex.front().type != TokenType.Comma) break; if(lex.front().type != TokenType.Comma) break;
oldcomma = true; oldcomma = true;