style: introduce & use STRING_1GROW

* src/flex-scanner.h (STRING_1GROW): New.
* src/scan-gram.l, src/scan-skel.l: Use it.
This commit is contained in:
Akim Demaille
2020-06-13 08:41:47 +02:00
parent e088b4f90f
commit b7fbfd050e
3 changed files with 19 additions and 16 deletions

View File

@@ -109,6 +109,9 @@ static struct obstack obstack_for_string;
# define STRING_FINISH() \
(last_string = obstack_finish0 (&obstack_for_string))
# define STRING_1GROW(Char) \
obstack_1grow (&obstack_for_string, Char)
# define STRING_FREE() \
obstack_free (&obstack_for_string, last_string)