mirror of
https://github.com/Cekis/SWG-ScriptConverter.git
synced 2026-10-17 07:03:00 -04:00
Add code
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using ScriptConverter.Ast.Expressions;
|
||||
using ScriptConverter.Parser;
|
||||
|
||||
namespace ScriptConverter.Ast.Statements
|
||||
{
|
||||
class ReturnStatement : Statement
|
||||
{
|
||||
public Expression Value { get; private set; }
|
||||
|
||||
public ReturnStatement(ScriptToken start, ScriptToken end, Expression value)
|
||||
: base(start, end)
|
||||
{
|
||||
Value = value;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
if (Value != null)
|
||||
Value.SetParent(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user