-/*
- * Single node in tree-linked AST.
- */
-struct mdoc_node {
- struct mdoc_node *parent; /* parent AST node */
- struct mdoc_node *child; /* first child AST node */
- struct mdoc_node *last; /* last child AST node */
- struct mdoc_node *next; /* sibling AST node */
- struct mdoc_node *prev; /* prior sibling AST node */
- int nchild; /* number children */
- int line; /* parse line */
- int pos; /* parse column */
- enum mdoct tok; /* tok or MDOC__MAX if none */
- int flags;
-#define MDOC_VALID (1 << 0) /* has been validated */
-#define MDOC_ACTED (1 << 1) /* has been acted upon */
-#define MDOC_EOS (1 << 2) /* at sentence boundary */
-#define MDOC_LINE (1 << 3) /* first macro/text on line */
-#define MDOC_SYNPRETTY (1 << 4) /* SYNOPSIS-style formatting */
-#define MDOC_ENDED (1 << 5) /* rendering has been ended */
- enum mdoc_type type; /* AST node type */
- enum mdoc_sec sec; /* current named section */
- union mdoc_data *norm; /* normalised args */
- /* FIXME: these can be union'd to shave a few bytes. */
- struct mdoc_arg *args; /* BLOCK/ELEM */
- struct mdoc_node *pending; /* BLOCK */
- struct mdoc_node *head; /* BLOCK */
- struct mdoc_node *body; /* BLOCK */
- struct mdoc_node *tail; /* BLOCK */
- char *string; /* TEXT */
- enum mdoc_endbody end; /* BODY */
-};
-
-/*
- * Names of macros. Index is enum mdoct. Indexing into this returns
- * the normalised name, e.g., mdoc_macronames[MDOC_Sh] -> "Sh".
- */