From d10e610796b99ced915fad2844ee2653b7623dcb Mon Sep 17 00:00:00 2001 From: otya128 Date: Sat, 24 Dec 2016 14:03:36 +0900 Subject: [PATCH] Fix to fix --- SMILEBASIC/parser.d | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/SMILEBASIC/parser.d b/SMILEBASIC/parser.d index 3227e9e..a884f62 100644 --- a/SMILEBASIC/parser.d +++ b/SMILEBASIC/parser.d @@ -945,21 +945,10 @@ class Parser while(true) { 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.Comma) break; oldcomma = true;