using System; using System.Collections.Generic; using System.Text; namespace Larkdown.Parser.Ast { public class TextNode : BlockNode { public string Text { get; private set; } public TextNode(int indent) : base(nameof(TextNode), indent) { Text = String.Empty; } public TextNode AddText(string text) { Text += String.IsNullOrEmpty(Text) ? text : " " + text; return this; } public bool IsEmpty() { return String.IsNullOrEmpty(Text); } } }