1
0

RESTORE (式)に対応

This commit is contained in:
otya128
2015-08-25 19:52:40 +09:00
parent 40b06463de
commit 750fedcbfc
4 changed files with 51 additions and 3 deletions

View File

@@ -1332,6 +1332,26 @@ class RestoreCode : Code
return "restore " ~ label.to!string;
}
}
class RestoreExprCode : Code
{
DataTable datatable;
this(DataTable datatable)
{
this.datatable = datatable;
}
override void execute(VM vm)
{
Value label;
vm.pop(label);
if(!label.isString)
throw new TypeMismatch();
datatable.dataIndex = datatable.label[label.stringValue];
}
override string toString(VM vm)
{
return "restore expr";
}
}
class PushSystemVariable : Code
{
SystemVariable var;