Skip to main content

Module helpers

Module helpers 

Source
Expand description

Convenience constructors for building AST argument slots and nodes.

Transform rules frequently need to assemble replacement Node trees. The helpers here eliminate the boilerplate of constructing Argument wrappers by hand, keeping rule implementations focused on semantics.

Enums§

FenceToken

Functions§

bare_command_node
Creates a known command node with no arguments.
delimiter_slot
Creates a mandatory delimiter argument slot.
dimension_slot
Creates a mandatory dimension argument slot.
infix_prefix_args
Creates the two mandatory content arguments used when converting an infix node to a prefix command.
integer_slot
Creates a mandatory integer argument slot.
linebreak_command_node
Creates the parser-shaped linebreak command.
mandatory_content_slot
Creates a mandatory content argument slot wrapping the subtree rooted at node_id.
prefix_command_node
Creates a prefix Node::Command from a builtin command record and a list of argument slots.
star_slot
Creates a star (boolean) argument slot, representing a * modifier on a command.