1
0

GAME1が動くようになった

This commit is contained in:
otya128
2015-08-20 20:11:33 +09:00
parent 886be04289
commit 8e0a4e0ae4
8 changed files with 275 additions and 30 deletions

View File

@@ -964,12 +964,27 @@ class Parser
auto token = lex.front();
while(true)
{
bool minusflag;
//TODO:constexpression()関数作る
if(token.type == TokenType.Minus)
{
lex.popFront();
token = lex.front();
minusflag = true;
}
if(token.type != TokenType.String && token.type != TokenType.Integer)
{
syntaxError();
return null;
}
data.addData(token.value);
if(minusflag)
{
data.addData(Value(-token.value.castDouble));
}
else
{
data.addData(token.value);
}
lex.popFront();
token = lex.front();
if(token.type == TokenType.Comma)