diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-12 11:21:44 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-12 11:21:44 +0000 |
commit | dfe0c6ee455f4a355885a711c81c5ae06ac20160 (patch) | |
tree | 315130eeda507d9b21635e011e5e3fd44e81fec9 /mdoc.h | |
parent | 19a85530e5d01229ad79001edab4bec02b3acda3 (diff) | |
download | mandoc-dfe0c6ee455f4a355885a711c81c5ae06ac20160.tar.gz |
Cache all of `Bd's resolved arguments into mdoc_bd, which is stashed in
the "data" union in mdoc_node. Allows me to remove some ugly loops in
the front-end and duplicate tests in mdoc_action.c. Add a regression
test to make sure we're not doing anything bad (more to come).
Diffstat (limited to 'mdoc.h')
-rw-r--r-- | mdoc.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -272,6 +272,12 @@ enum mdoc_disp { DISP_literal }; +struct mdoc_bd { + const char *offs; + enum mdoc_disp type; + int comp; +}; + /* Node in AST. */ struct mdoc_node { struct mdoc_node *parent; /* parent AST node */ @@ -300,7 +306,7 @@ struct mdoc_node { union { enum mdoc_list list; /* `Bl' nodes */ - enum mdoc_disp disp; /* `Bd' nodes */ + struct mdoc_bd Bd; } data; }; |