gbranden pushed a commit to branch master in repository groff. commit b2887c3904bce09acae9450fe3b77dd96daa92cc Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Mon Mar 3 01:55:53 2025 -0600
[troff]: Implement recursive node dumping (5d/9). * src/roff/troff/node.h (class extra_size_node): Specialize (override) `dump_properties()` for this class. * src/roff/troff/node.cpp (extra_size_node::dump_properties): New member function reports value of `vunits` property. Changes `pline` request output as follows. -{"type": "extra_size_node", "diversion level": 0, "is_special_node": false}, +{"type": "extra_size_node", "diversion level": 0, "is_special_node": false, "vunits": 3000}, --- ChangeLog | 7 +++++++ src/roff/troff/node.cpp | 7 +++++++ src/roff/troff/node.h | 1 + 3 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index b6e6af3f2..6c38da087 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-03-03 G. Branden Robinson <g.branden.robin...@gmail.com> + + * src/roff/troff/node.h (class extra_size_node): Specialize + {override} `dump_properties()` for this class. + * src/roff/troff/node.cpp (extra_size_node::dump_properties): + New member function reports value of `vunits` property. + 2025-03-03 G. Branden Robinson <g.branden.robin...@gmail.com> * src/roff/troff/node.h (class diverted_copy_file_node): diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp index f538344e2..635195011 100644 --- a/src/roff/troff/node.cpp +++ b/src/roff/troff/node.cpp @@ -3014,6 +3014,13 @@ extra_size_node::extra_size_node(vunits i) { } +void extra_size_node::dump_properties() +{ + node::dump_properties(); + fprintf(stderr, ", \"vunits\": %d", n.to_units()); + fflush(stderr); +} + node *vertical_size_node::copy() { return new vertical_size_node(n, state, div_nest_level); diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h index 0c5d176d0..aa0293145 100644 --- a/src/roff/troff/node.h +++ b/src/roff/troff/node.h @@ -322,6 +322,7 @@ public: const char *type(); bool causes_tprint(); bool is_tag(); + void dump_properties(); }; class vertical_size_node : public node { _______________________________________________ groff-commit mailing list groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit