REMを実装
This commit is contained in:
@@ -126,7 +126,8 @@ 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);
|
||||||
break;
|
if (i >= code.length)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if(c.isDigit() || c == '.')
|
if(c.isDigit() || c == '.')
|
||||||
{
|
{
|
||||||
@@ -195,8 +196,22 @@ class Lexical
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
token = Token(TokenType.Iden, Value(iden));
|
if (iden == "REM")
|
||||||
break;
|
{
|
||||||
|
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));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(c == '"')
|
if(c == '"')
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user