1
0

ON GOTO,GOSUBを定義

This commit is contained in:
otya128
2015-08-18 22:50:37 +09:00
parent 90a88f1b3a
commit edbbcf3250
2 changed files with 16 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ enum NodeType
Data, Data,
Read, Read,
Restore, Restore,
On,
} }
abstract class Node abstract class Node
{ {
@@ -448,3 +449,17 @@ class Data : Statement
data ~= v; data ~= v;
} }
} }
class On : Statement
{
bool isGosub;
wstring[] labels;
this(bool isgosub)
{
this.isGosub = isgosub;
this.labels = new wstring[0];
}
void addLabel(wstring label)
{
this.labels ~= label;
}
}

View File

@@ -61,6 +61,7 @@ enum TokenType
Data, Data,
Read, Read,
Restore, Restore,
On,
} }
struct Token struct Token