1
0

OUTを配列変数などに対応させた

This commit is contained in:
otya128
2016-08-31 17:53:02 +09:00
parent 191ee91edb
commit 0866fc0739
3 changed files with 7 additions and 7 deletions

View File

@@ -940,9 +940,9 @@ class Compiler
}
}
//TODO:OUT
foreach_reverse(wstring var; func.outVariable)
foreach_reverse(var; func.outVariable)
{
genCodePopVar(var, s);
compilePopVar(var, s);
}
}
break;

View File

@@ -443,7 +443,7 @@ class CallFunctionStatement : Statement
{
wstring name;
Expression[] args;
wstring[] outVariable;
Expression[] outVariable;
this(wstring n, SourceLocation loc)
{
super.location = loc;
@@ -455,7 +455,7 @@ class CallFunctionStatement : Statement
{
args ~= arg;
}
void addOut(wstring var)
void addOut(Expression var)
{
outVariable ~= var;
}

View File

@@ -858,13 +858,13 @@ class Parser
while(true)
{
token = lex.front();
if(token.type != TokenType.Iden)
Expression arg = expression();
if(!isLValue(arg))
{
syntaxError();
return null;
}
wstring arg = token.value.stringValue;
func.addOut(arg);
lex.popFront();
token = lex.front();
if(token.type == TokenType.Comma)
{