progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
35
AspClassic.Parser/Declaration.cs
Normal file
35
AspClassic.Parser/Declaration.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
#define DEBUG
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for a declaration.
|
||||
/// </summary>
|
||||
public class Declaration : Statement
|
||||
{
|
||||
public override bool IsBad => base.Type == TreeType.SyntaxError;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a bad declaration.
|
||||
/// </summary>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
/// <param name="comments">The comments for the parse tree.</param>
|
||||
/// <returns>A bad declaration.</returns>
|
||||
public static Declaration GetBadDeclaration(Span span, IList<Comment> comments)
|
||||
{
|
||||
return new Declaration(span, comments);
|
||||
}
|
||||
|
||||
protected Declaration(TreeType type, Span span, IList<Comment> comments)
|
||||
: base(type, span, comments)
|
||||
{
|
||||
Debug.Assert(type >= TreeType.EmptyDeclaration && type <= TreeType.DelegateFunctionDeclaration);
|
||||
}
|
||||
|
||||
private Declaration(Span span, IList<Comment> comments)
|
||||
: base(TreeType.SyntaxError, span, comments)
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue