40 lines
897 B
C#
40 lines
897 B
C#
using System;
|
|
|
|
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A parse tree for a comment.
|
|
/// </summary>
|
|
public sealed class Comment : Tree
|
|
{
|
|
private readonly string _Comment;
|
|
|
|
private readonly bool _IsREM;
|
|
|
|
/// <summary>
|
|
/// The text of the comment.
|
|
/// </summary>
|
|
public string VComment => _Comment;
|
|
|
|
/// <summary>
|
|
/// Whether the comment is a REM comment.
|
|
/// </summary>
|
|
public bool IsREM => _IsREM;
|
|
|
|
/// <summary>
|
|
/// Constructs a new comment parse tree.
|
|
/// </summary>
|
|
/// <param name="comment">The text of the comment.</param>
|
|
/// <param name="isREM">Whether the comment is a REM comment.</param>
|
|
/// <param name="span">The location of the parse tree.</param>
|
|
public Comment(string comment, bool isREM, Span span)
|
|
: base(TreeType.Comment, span)
|
|
{
|
|
if (comment == null)
|
|
{
|
|
throw new ArgumentNullException("comment");
|
|
}
|
|
_Comment = comment;
|
|
_IsREM = isREM;
|
|
}
|
|
}
|