1
0

REMを実装

This commit is contained in:
otya128
2016-09-03 11:11:12 +09:00
parent 805f79a225
commit 69a4033250

View File

@@ -126,6 +126,7 @@ class Lexical
if(table[cast(char)c] == TokenType.NewLine) break; if(table[cast(char)c] == TokenType.NewLine) break;
} }
token = Token(TokenType.NewLine); token = Token(TokenType.NewLine);
if (i >= code.length)
break; break;
} }
if(c.isDigit() || c == '.') if(c.isDigit() || c == '.')
@@ -195,9 +196,23 @@ class Lexical
break; break;
} }
} }
if (iden == "REM")
{
for(;i < code.length;i++)
{
c = code[i];
if(table[cast(char)c] == TokenType.NewLine) break;
}
token = Token(TokenType.NewLine);
if (i >= code.length)
break;
}
else
{
token = Token(TokenType.Iden, Value(iden)); token = Token(TokenType.Iden, Value(iden));
break; break;
} }
}
if(c == '"') if(c == '"')
{ {
i++; i++;