progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
40
AspClassic.Parser/Comment.cs
Normal file
40
AspClassic.Parser/Comment.cs
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue