1
0

PRINTの構文解析を修正

This commit is contained in:
otya128
2015-06-04 23:03:37 +09:00
parent c33df7e4ac
commit 9b36cd2961
2 changed files with 7 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ module otya.smilebasic.vm;
import otya.smilebasic.type;
import otya.smilebasic.token;
import std.uni;
import std.utf;
import std.conv;
import std.stdio;
class VM
@@ -64,7 +65,7 @@ class PrintCode : Code
write(arg.integerValue);
break;
case ValueType.String:
write(cast(string)arg.stringValue);
write(arg.stringValue.to!string);
break;
default:
//type missmatch

View File

@@ -314,7 +314,11 @@ class Parser
}
print.addArgument(exp);
token = lex.front();
if(lex.empty()) break;
if(lex.empty())
{
print.addLine();
break;
}
if(token.type != TokenType.Colon && token.type != TokenType.NewLine && token.type != TokenType.Semicolon && token.type != TokenType.Comma)
{
syntaxError();