#define DEBUG
using System.Collections.Generic;
using System.Diagnostics;
namespace AspClassic.Parser;
///
/// A parse tree for a declaration.
///
public class Declaration : Statement
{
public override bool IsBad => base.Type == TreeType.SyntaxError;
///
/// Creates a bad declaration.
///
/// The location of the parse tree.
/// The comments for the parse tree.
/// A bad declaration.
public static Declaration GetBadDeclaration(Span span, IList comments)
{
return new Declaration(span, comments);
}
protected Declaration(TreeType type, Span span, IList comments)
: base(type, span, comments)
{
Debug.Assert(type >= TreeType.EmptyDeclaration && type <= TreeType.DelegateFunctionDeclaration);
}
private Declaration(Span span, IList comments)
: base(TreeType.SyntaxError, span, comments)
{
}
}