複数の引数のINPUTが正常に動くように

This commit is contained in:
otya128 committed 2015-08-19 11:37:22 +09:00
1 parent c75b129567
commit a9d7cd1953
2 files changed
+15 -4

No files matched your search

+2 -2
View File
@@ -79,8 +79,8 @@ DEF ONGOSUBTEST
RETURN
@4
END
INPUT "A";INPUT$
?INPUT$
INPUT INPUT$,IN
?INPUT$,IN
@DATA_1
DATA "A",1,2,3,4
LOCATE 10,
+13 -2
View File
@@ -824,7 +824,7 @@ class Parser
return null;
}
auto token = lex.front();
if(token.type == TokenType.Semicolon || token.type == TokenType.Comma)
if(token.type == TokenType.Semicolon || (token.type == TokenType.Comma && !isLValue(message)))
{
Input input = new Input(message, token.type == TokenType.Semicolon);
do
@@ -836,7 +836,6 @@ class Parser
syntaxError();
}
input.addVariable(expr);
lex.popFront();
token = lex.front();
} while(token.type == TokenType.Comma);
return input;
@@ -850,6 +849,18 @@ class Parser
}
Input input = new Input(null, true);
input.addVariable(message);
do
{
lex.popFront();
auto expr = expression();
if(!isLValue(expr))
{
syntaxError();
}
input.addVariable(expr);
token = lex.front();
} while(token.type == TokenType.Comma);
return input;
}
}