d: fix syntax error on SymbolKind.toString method

Reported by ledaniel2.
<https://github.com/akimd/bison/issues/88>

* data/skeletons/d.m4: Here.
This commit is contained in:
Adela Vais
2022-09-19 19:09:20 +02:00
committed by Akim Demaille
parent be4528096e
commit 0faf371992

View File

@@ -284,8 +284,7 @@ m4_define([b4_declare_symbol_enum],
that double-quoting is unnecessary unless the string contains an that double-quoting is unnecessary unless the string contains an
apostrophe, a comma, or backslash (other than backslash-backslash). apostrophe, a comma, or backslash (other than backslash-backslash).
YYSTR is taken from yytname. */ YYSTR is taken from yytname. */
final void toString(W)(W sink) const final void toString(void delegate(const(char)[]) sink) const
if (isOutputRange!(W, char))
{ {
immutable string[] yy_sname = @{ immutable string[] yy_sname = @{
]b4_symbol_names[ ]b4_symbol_names[
@@ -296,7 +295,7 @@ m4_define([b4_declare_symbol_enum],
]b4_translatable[ ]b4_translatable[
@};]])[ @};]])[
put(sink, yy_sname[yycode_]); sink.formattedWrite!"%s"(yy_sname[yycode_]);
} }
} }
]]) ]])