1
0

代入の実�

This commit is contained in:
otya128
2015-06-05 21:41:40 +09:00
parent edd9affacc
commit a28ff352fa
4 changed files with 53 additions and 11 deletions

View File

@@ -43,6 +43,7 @@ enum CodeType
Goto,
Gosub,
Print,
PopG,
}
abstract class Code
{
@@ -108,6 +109,19 @@ class PushG : Code
vm.push(vm.global[var]);
}
}
class PopG : Code
{
int var;
this(int var)
{
this.type = CodeType.PopG;
this.var = var;
}
override void execute(VM vm)
{
vm.pop(vm.global[var]);
}
}
class Operate : Code
{
TokenType operator;