commit - 424803ac446821016c55b334cd85a83aba4d3f37
commit + 19a5edf3da4acec32a964ac91c065e121b0a0ec2
blob - e626a5c1982cf4b49415b877bfca979ec3c3ab01
blob + c97478128fa19c9cddcf687a802db929cfa6bd36
--- template/parse.y
+++ template/parse.y
%token DEFINE ELSE END ERROR FINALLY FOR IF INCLUDE PRINTF
%token RENDER TQFOREACH UNSAFE URLESCAPE WHILE
%token <v.string> STRING
-%type <v.string> string
+%type <v.string> string nstring
%type <v.string> stringy
%%
| verbatims verbatim
;
-raw : STRING {
+raw : nstring {
dbg();
fprintf(fp, "if ((tp_ret = tp->tp_puts(tp, ");
printq($1);
} verbatims
;
+nstring : STRING nstring {
+ if (asprintf(&$$, "%s%s", $1, $2) == -1)
+ err(1, "asprintf");
+ free($1);
+ free($2);
+ }
+ | STRING
+ ;
+
string : STRING string {
if (asprintf(&$$, "%s %s", $1, $2) == -1)
err(1, "asprintf");