summaryrefslogtreecommitdiff
path: root/lib/command_graph.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2024-07-20 18:28:35 -0700
committerDonald Sharp <sharpd@nvidia.com>2024-07-31 08:08:53 -0400
commitece3132471a1f361b82dde47bbf8cbf9675a12a8 (patch)
tree2ba5c877ded4d23c303712f079e0c596b8f43aa8 /lib/command_graph.h
parentcb9d20b712c6b09ee6516f134e44e2a4a7181694 (diff)
lib/clippy: add `CMD_ELEMENT_TKN`
The command graph has its tail end nodes pointing at the `struct cmd_element` rather than a `struct cmd_token`. This is a bit weird to begin with, but becomes very annoying for the python bindings where there is just no `struct cmd_element`. Create a `CMD_ELEMENT_TKN` type for `cmd_token` instead, and replace the tail end token in the python bindings with an instance of that. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/command_graph.h')
-rw-r--r--lib/command_graph.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/command_graph.h b/lib/command_graph.h
index 25aa47db7b..313c97fe87 100644
--- a/lib/command_graph.h
+++ b/lib/command_graph.h
@@ -54,6 +54,9 @@ enum cmd_token_type {
END_TKN, // last token in line
NEG_ONLY_TKN, // filter token, match if "no ..." command
+#ifdef BUILDING_CLIPPY
+ CMD_ELEMENT_TKN, // python bindings only
+#endif
SPECIAL_TKN = FORK_TKN,
};
/* clang-format on */