mirror of
https://github.com/Cekis/SWG-ScriptConverter.git
synced 2026-09-11 22:44:59 -04:00
Add code
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using ScriptConverter.Ast.Expressions;
|
||||
using ScriptConverter.Parser;
|
||||
|
||||
namespace ScriptConverter.Ast.Statements
|
||||
{
|
||||
class DoStatement : Statement
|
||||
{
|
||||
public Expression Condition { get; private set; }
|
||||
public BlockStatement Block { get; private set; }
|
||||
|
||||
public DoStatement(ScriptToken start, ScriptToken end, Expression condition, BlockStatement block)
|
||||
: base(start, end)
|
||||
{
|
||||
Condition = condition;
|
||||
Block = block;
|
||||
}
|
||||
|
||||
public override TStmt Accept<TDoc, TDecl, TStmt, TExpr>(IAstVisitor<TDoc, TDecl, TStmt, TExpr> visitor)
|
||||
{
|
||||
return visitor.Visit(this);
|
||||
}
|
||||
|
||||
public override void SetParent(Statement parent)
|
||||
{
|
||||
Parent = parent;
|
||||
|
||||
Condition.SetParent(null);
|
||||
Block.SetParent(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user