Skip to content

class LateLuaWhatsitNode

  • supers: WhatsitNode

The difference between data and string is that on assignment, the data field is converted to a token list, cf. use as latelua. The string version is treated as a literal string.

When a function is used, it gets called with as first argument the node that triggers the call.

Example:

assert.node_type("whatsit", "late_lua", {
  id = "whatsit (8)",
  subtype = "late_lua (8)",
  fields = {
    "prev (-1)",
    "next (0)",
    "id (1)",
    "subtype (2)",
    "attr (3)",
    "reg (4)",
    "data (5)",
    "name (6)",
    "string (7)",
  },
})

Reference:

😱 Types incomplete or incorrect? 🙏 Please contribute!


fields


LateLuaWhatsitNode.attr


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

A list of attributes.

LateLuaWhatsitNode.data


LateLuaWhatsitNode.data : (string|function)

the to be written information stored as Lua value

LateLuaWhatsitNode.token


LateLuaWhatsitNode.token : string

the to be written information stored as token list

LateLuaWhatsitNode.name


LateLuaWhatsitNode.name : string

the name to use for Lua error reporting