mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12: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. ##
|
||||
## ---------------- ##
|
||||
|
||||
Reference in New Issue
Block a user