mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
kinds: use the symbol kinds where applicable
Instead of generating switch statements with numbers, let's use the symbol kinds. Not only is this more readable, it also makes reading diff easier, as a change in symbol numbers won't have such a large effect on the implementation of symbol actions. * data/skeletons/bison.m4 (_b4_symbol_case): Use the symbol kind rather than its number.
This commit is contained in:
@@ -547,7 +547,7 @@ m4_popdef([b4_actions_])dnl
|
|||||||
# easier to use with m4_map, but then, use []dnl to suppress the last
|
# easier to use with m4_map, but then, use []dnl to suppress the last
|
||||||
# one.
|
# one.
|
||||||
m4_define([_b4_symbol_case],
|
m4_define([_b4_symbol_case],
|
||||||
[case b4_symbol([$1], [number]): b4_symbol_tag_comment([$1])])
|
[case b4_symbol([$1], [kind]): b4_symbol_tag_comment([$1])])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user