代入の実�
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user