class Herb::AST::HTMLOpenTagNode
def initialize(type, location, errors, tag_opening, tag_name, tag_closing, children, is_void)
def initialize(type, location, errors, tag_opening, tag_name, tag_closing, children, is_void) super(type, location, errors) @tag_opening = tag_opening @tag_name = tag_name @tag_closing = tag_closing @children = children @is_void = is_void end
def inspect
def inspect tree_inspect.rstrip.gsub(/\s+$/, "") end
def to_hash
def to_hash super.merge({ tag_opening: tag_opening, tag_name: tag_name, tag_closing: tag_closing, children: children, is_void: is_void, }) end
def tree_inspect(indent = 0)
def tree_inspect(indent = 0) output = +"" output += "@ #{node_name} " output += location.tree_inspect output += "\n" output += inspect_errors(prefix: "│ ") output += "├── tag_opening: " output += tag_opening ? tag_opening.tree_inspect : "∅" output += "\n" output += "├── tag_name: " output += tag_name ? tag_name.tree_inspect : "∅" output += "\n" output += "├── tag_closing: " output += tag_closing ? tag_closing.tree_inspect : "∅" output += "\n" output += "├── children: " output += inspect_array(children, prefix: "│ ") output += "└── is_void: " output += [true, false].include?(is_void) ? is_void.to_s : "∅" output += "\n" output += "\n" output.gsub(/^/, " " * indent) end