Files
irongo/src/IronGo/AST/Comment.cs
2025-07-23 00:47:04 -04:00

19 lines
572 B
C#

namespace MarketAlly.IronGo.AST;
/// <summary>
/// Represents a comment in Go source code
/// </summary>
public class Comment : GoNodeBase
{
public string Text { get; }
public bool IsLineComment { get; }
public Comment(string text, bool isLineComment, Position start, Position end) : base(start, end)
{
Text = text;
IsLineComment = isLineComment;
}
public override void Accept(IGoAstVisitor visitor) => visitor.VisitComment(this);
public override T Accept<T>(IGoAstVisitor<T> visitor) => visitor.VisitComment(this);
}