REMを実装
This commit is contained in:
@@ -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++;
|
||||||
|
|||||||
Reference in New Issue
Block a user