1
0

変数宣言実装中

This commit is contained in:
otya128
2015-06-11 19:29:34 +09:00
parent 7c383dff1a
commit c050d4e066
4 changed files with 64 additions and 12 deletions

View File

@@ -28,6 +28,7 @@ enum NodeType
End,
Break,
Continue,
Var,
DefineVariable,
DefineArray,
}
@@ -291,6 +292,23 @@ class Continue : Statement
this.type = NodeType.Continue;
}
}
class Var : Statement
{
Statement[] define;
this()
{
this.type = NodeType.Var;
this.define = new Statement[0];
}
void addDefineVar(DefineVariable dv)
{
this.define ~= dv;
}
void addDefineArray(DefineArray da)
{
this.define ~= da;
}
}
class DefineVariable : Statement
{
wstring name;