mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
m4: allow the definition of side-effect only macros
* data/bison.m4 (b4_divert_kill, b4_define_silent): New. * data/c.m4: Comment change.
This commit is contained in:
@@ -85,6 +85,20 @@ m4_changecom([#])
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_divert_kill(CODE)
|
||||||
|
# --------------------
|
||||||
|
# Expand CODE for its side effects, discard its output.
|
||||||
|
m4_define([b4_divert_kill],
|
||||||
|
[m4_divert_text([KILL], [$1])])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_define_silent(MACRO, CODE)
|
||||||
|
# -----------------------------
|
||||||
|
# Same as m4_define, but throw away the expansion of CODE.
|
||||||
|
m4_define([b4_define_silent],
|
||||||
|
[m4_define([$1], [b4_divert_kill([$2])])])
|
||||||
|
|
||||||
|
|
||||||
## ---------------- ##
|
## ---------------- ##
|
||||||
## Error handling. ##
|
## Error handling. ##
|
||||||
## ---------------- ##
|
## ---------------- ##
|
||||||
|
|||||||
@@ -549,7 +549,7 @@ b4_pure_if([], [[extern ]b4_api_PREFIX[STYPE ]b4_prefix[lval;
|
|||||||
|
|
||||||
|
|
||||||
# b4_YYDEBUG_define
|
# b4_YYDEBUG_define
|
||||||
# ------------------
|
# -----------------
|
||||||
m4_define([b4_YYDEBUG_define],
|
m4_define([b4_YYDEBUG_define],
|
||||||
[[/* Debug traces. */
|
[[/* Debug traces. */
|
||||||
]m4_if(b4_api_prefix, [yy],
|
]m4_if(b4_api_prefix, [yy],
|
||||||
|
|||||||
Reference in New Issue
Block a user