Comment

public final class Comment: TextNode

This represents the content of a comment, i.e., all the characters between the starting <!-- and ending -->.

  • The nodeType of a Comment is .comment.

    Declaration

    Swift

    public static let nodeType: NodeType = .comment
  • The nodeName of a Comment is #comment.

    Declaration

    Swift

    public final let nodeName: String = "#comment"
  • The attributes dictionary of a Comment is nil.

    Declaration

    Swift

    public final let attributes: [String : String]? = nil
  • The string contents of this comment.

    Declaration

    Swift

    public final var text: String
  • Creates a new Comment node.

    Declaration

    Swift

    public init(text: String)

    Parameters

    text

    The string contents of this comment.

  • A comment node calls visit(self) on the visitor.

    Declaration

    Swift

    public func accept(_ visitor: Visitor)