Skip to content

class InsNode

  • supers: Node

Insertions are represented by ins node records, where the subtype indicates the corresponding box number.

Example:

assert.node_type("ins", nil, {
  id = "ins (3)",
  fields = {
    "prev (-1)",
    "next (0)",
    "id (1)",
    "subtype (2)",
    "attr (3)",
    "cost (4)",
    "depth (5)",
    "height (6)",
    "spec (7)",
    "head (8)",
  },
})

Reference:

😱 Types incomplete or incorrect? 🙏 Please contribute!


fields


InsNode.subtype


InsNode.subtype : number

the insertion class

InsNode.attr


InsNode.attr : Node {
    next: Node?,
    prev: Node?,
    id: integer,
    subtype: integer,
    head: Node?,
    attr: Node,
}

A list of attributes.

InsNode.cost


InsNode.cost : integer

the penalty associated with this insert

InsNode.height


InsNode.height : integer

height of the insert

InsNode.depth


InsNode.depth : integer

depth of the insert

InsNode.head


InsNode.head : Node {
    next: Node?,
    prev: Node?,
    id: integer,
    subtype: integer,
    head: Node?,
    attr: Node,
}

the first node of the body of this insert

InsNode.list


InsNode.list : Node {
    next: Node?,
    prev: Node?,
    id: integer,
    subtype: integer,
    head: Node?,
    attr: Node,
}

the first node of the body of this insert