This commit is contained in:
Rohan Singh
2019-01-23 22:52:45 -05:00
parent 3f69ec7987
commit ad50a19057
103 changed files with 5734 additions and 1 deletions
@@ -0,0 +1,25 @@
using System;
using ScriptConverter.Parser;
namespace ScriptConverter.Ast.Statements
{
abstract class Statement
{
public readonly ScriptToken Start;
public readonly ScriptToken End;
public Statement Parent { get; protected set; }
protected Statement(ScriptToken start, ScriptToken end = null)
{
if (start == null)
throw new ArgumentNullException("start");
Start = start;
End = end ?? start;
}
public abstract TStmt Accept<TDoc, TDecl, TStmt, TExpr>(IAstVisitor<TDoc, TDecl, TStmt, TExpr> visitor);
public abstract void SetParent(Statement parent);
}
}