代入の実�
This commit is contained in:
1 parent
edd9affacc
commit
a28ff352fa
4 files changed
+53
-11
No files matched your search
@@ -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