関数内ラベル実装と引数なし関数を正常に呼べるようにした

This commit is contained in:
otya128 committed 2015-07-13 21:39:42 +09:00
1 parent b51fe86fd6
commit 5dff13b64f
8 files changed
+215 -47

No files matched your search

+16
View File
@@ -36,6 +36,9 @@ enum NodeType
DefineFunction,
While,
Inc,
Data,
Read,
Restore,
}
abstract class Node
{
@@ -432,3 +435,16 @@ class Inc : Statement
this.expression = expr;
}
}
class Data : Statement
{
Value[] data;
this()
{
this.type = NodeType.Data;
this.data = new Value[0];
}
void addData(Value v)
{
data ~= v;
}
}