ラベルとGOTOを実�
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user