diff options
author | Akim Demaille <akim@lrde.epita.fr> | 2013-04-11 09:21:08 +0200 |
---|---|---|
committer | Akim Demaille <akim@lrde.epita.fr> | 2013-04-11 09:21:08 +0200 |
commit | 08cc1a3b1801cafcd0354ce10161571fa45b4553 (patch) | |
tree | 78cb936107e1333cf3baff5105c6e5441d0473c1 /src/muscle-tab.h | |
parent | edaa22ec15eef6a61c4a07ed20dac63ffd7ddde6 (diff) | |
download | bison-08cc1a3b1801cafcd0354ce10161571fa45b4553.tar.gz |
muscles: be sure that %code snippets are not glue together on a single line
Recently "braceless" in the parser was changed so that an eol was no
longer added to the value. This is not correct when a %code is used
multiple times, because the syncline of the next snippet might be
appended to the last (and not ended) line of the previous snippet.
* src/muscle-tab.h (muscle_grow): Make it private.
* src/muscle-tab.c (muscle_grow): Accept a fourth argument: a required
terminator.
Adjust callers.
* tests/input.at (Multiple %code): New.
Diffstat (limited to 'src/muscle-tab.h')
-rw-r--r-- | src/muscle-tab.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/muscle-tab.h b/src/muscle-tab.h index af6b615c..3199a2d4 100644 --- a/src/muscle-tab.h +++ b/src/muscle-tab.h @@ -99,14 +99,9 @@ extern struct obstack muscle_obstack; MUSCLE_INSERT_STRING(Key, quotearg_style (c_quoting_style, Value)) -/* Append VALUE to the current value of KEY. If KEY did not already - exist, create it. Use MUSCLE_OBSTACK. De-allocate the previously - associated value. Copy VALUE and SEPARATOR. */ -void muscle_grow (const char *key, const char *value, const char *separator); - - /* Append VALUE to the current value of KEY, using muscle_grow. But - in addition, issue a synchronization line for the location LOC. */ + in addition, issue a synchronization line for the location LOC. + Be sure to append on a new line. */ void muscle_code_grow (const char *key, const char *value, location loc); |