This commit is contained in:
Jelle Luteijn 2022-05-15 11:19:49 +02:00
parent 16e76d6b31
commit 484dbfc9d9
529 changed files with 113694 additions and 0 deletions

View file

@ -0,0 +1,40 @@
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;
}
}