1
0

ラベルとGOTOを実�

This commit is contained in:
otya128
2015-06-06 14:51:45 +09:00
parent 88ad0392a1
commit 2eaab2ef55
6 changed files with 91 additions and 2 deletions

View File

@@ -18,6 +18,8 @@ enum NodeType
Assign,
CallFunctionStatement,
Print,
Label,
Goto,
}
abstract class Node
{
@@ -171,3 +173,21 @@ class Assign : Statement
this.expression = expr;
}
}
class Label : Statement
{
wstring label;
this(wstring name)
{
this.type = NodeType.Label;
this.label = name;
}
}
class Goto : Statement
{
wstring label;
this(wstring name)
{
this.type = NodeType.Goto;
this.label = name;
}
}