progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
29
AspClassic.Parser/Statement.cs
Normal file
29
AspClassic.Parser/Statement.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
#define DEBUG
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for a statement.
|
||||
/// </summary>
|
||||
public abstract class Statement : Tree
|
||||
{
|
||||
private readonly ReadOnlyCollection<Comment> _Comments;
|
||||
|
||||
/// <summary>
|
||||
/// The comments for the tree.
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Comment> Comments => _Comments;
|
||||
|
||||
protected Statement(TreeType type, Span span, IList<Comment> comments)
|
||||
: base(type, span)
|
||||
{
|
||||
Debug.Assert((type >= TreeType.EmptyStatement && type <= TreeType.EndBlockStatement) || (type >= TreeType.EmptyDeclaration && type <= TreeType.DelegateFunctionDeclaration));
|
||||
if (comments != null)
|
||||
{
|
||||
_Comments = new ReadOnlyCollection<Comment>(comments);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue