Whileを植えた
This commit is contained in:
@@ -34,6 +34,7 @@ enum NodeType
|
|||||||
DefineArray,
|
DefineArray,
|
||||||
ArrayAssign,
|
ArrayAssign,
|
||||||
DefineFunction,
|
DefineFunction,
|
||||||
|
While,
|
||||||
}
|
}
|
||||||
abstract class Node
|
abstract class Node
|
||||||
{
|
{
|
||||||
@@ -408,3 +409,14 @@ class CallFunctionStatement : Statement
|
|||||||
outVariable ~= var;
|
outVariable ~= var;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
class While : Statement
|
||||||
|
{
|
||||||
|
Expression condExpression;
|
||||||
|
Statements statements;
|
||||||
|
this(Expression condExpression, Statements statements)
|
||||||
|
{
|
||||||
|
this.type = NodeType.While;
|
||||||
|
this.condExpression = condExpression;
|
||||||
|
this.statements = statements;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ enum TokenType
|
|||||||
RBracket,//]
|
RBracket,//]
|
||||||
Def,
|
Def,
|
||||||
Out,
|
Out,
|
||||||
|
While,
|
||||||
|
Wend,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Token
|
struct Token
|
||||||
|
|||||||
Reference in New Issue
Block a user