style: prefer b4_symbol(empty, ...) to b4_symbol(-2, ...)

* data/skeletons/c.m4: here.
This commit is contained in:
Akim Demaille
2020-11-13 06:40:45 +01:00
parent 23472033ee
commit b9b13602ed

View File

@@ -521,7 +521,7 @@ m4_define([b4_token_define],
# Output the definition of the tokens. # Output the definition of the tokens.
m4_define([b4_token_defines], m4_define([b4_token_defines],
[[/* Token kinds. */ [[/* Token kinds. */
#define ]b4_symbol([-2], [id])[ -2 #define ]b4_symbol(empty, [id])[ -2
]m4_join([ ]m4_join([
], b4_symbol_map([b4_token_define])) ], b4_symbol_map([b4_token_define]))
]) ])
@@ -549,7 +549,7 @@ m4_define([b4_token_enums],
# define ]b4_api_PREFIX[TOKENTYPE # define ]b4_api_PREFIX[TOKENTYPE
enum ]b4_api_prefix[tokentype enum ]b4_api_prefix[tokentype
{ {
]b4_symbol([-2], [id])[ = -2, ]b4_symbol(empty, [id])[ = -2,
]b4_symbol_foreach([b4_token_enum])dnl ]b4_symbol_foreach([b4_token_enum])dnl
[ }; [ };
typedef enum ]b4_api_prefix[tokentype ]b4_api_prefix[token_kind_t; typedef enum ]b4_api_prefix[tokentype ]b4_api_prefix[token_kind_t;
@@ -599,7 +599,7 @@ m4_define([b4_declare_symbol_enum],
[[/* Symbol kind. */ [[/* Symbol kind. */
enum yysymbol_kind_t enum yysymbol_kind_t
{ {
]b4_symbol([-2], kind_base)[ = -2, ]b4_symbol(empty, [kind_base])[ = -2,
]b4_symbol_foreach([b4_symbol_enum])dnl ]b4_symbol_foreach([b4_symbol_enum])dnl
[}; [};
typedef enum yysymbol_kind_t yysymbol_kind_t; typedef enum yysymbol_kind_t yysymbol_kind_t;