/// <inheritdoc /> public override bool StructurallyEquals(BBNode node) { return(node is BBTagNode tagNode && SelfClosing == tagNode.SelfClosing && Name == tagNode.Name && Value == tagNode.Value && Children.Zip(tagNode.Children, (a, b) => a.StructurallyEquals(b)).All(x => x)); }
/// <inheritdoc /> public void AddChild(BBNode child) { if (SelfClosing) { throw new InvalidOperationException("A self-closing tag cannot have children."); } else { _children.Add(child); } }
/// <inheritdoc /> public override bool StructurallyEquals(BBNode node) { return(node is BBTextNode textNode && Content == textNode.Content); }