using System; namespace AspClassic.Parser; /// /// A comment token. /// public sealed class CommentToken : Token { private readonly bool _IsREM; private readonly string _Comment; /// /// Whether the comment was preceded by REM. /// public bool IsREM => _IsREM; /// /// The text of the comment. /// public string Comment => _Comment; /// /// Constructs a new comment token. /// /// The comment value. /// Whether the comment was preceded by REM. /// The location of the comment. public CommentToken(string comment, bool isREM, Span span) : base(TokenType.Comment, span) { if (comment == null) { throw new ArgumentNullException("comment"); } _IsREM = isREM; _Comment = comment; } }