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 | af1a16ee46c535e7e97fe26fc4c6c05844de41e2 (patch) | |
tree | bdb915b10db4fb4c1abb8e6c595cfc2957cb98e2 /mdoc.h | |
parent | 0b20ee1ae342d058c3e78b46ba69335c80addfda (diff) | |
download | mandoc-af1a16ee46c535e7e97fe26fc4c6c05844de41e2.tar.gz mandoc-af1a16ee46c535e7e97fe26fc4c6c05844de41e2.tar.zst mandoc-af1a16ee46c535e7e97fe26fc4c6c05844de41e2.zip |
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 | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: mdoc.h,v 1.84 2010/06/12 10:09:19 kristaps Exp $ */ +/* $Id: mdoc.h,v 1.85 2010/06/12 11:21:44 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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; }; |