fix brace eating bug

This commit is contained in:
anon 2024-10-28 16:37:53 +01:00
parent 856364f786
commit 73ab612997

@ -76,7 +76,10 @@ leave[[:space:]] { return LEAVE; }
}
<IN_CODE>{
\{ { ++code_nesting; }
\{ {
buffer = sdscat(buffer, yytext);
++code_nesting;
}
\} {
if (!code_nesting) {
yylval.strval = strdup(buffer);
@ -85,6 +88,7 @@ leave[[:space:]] { return LEAVE; }
return CODE_BLOB;
}
buffer = sdscat(buffer, yytext);
--code_nesting;
}
.|\n { buffer = sdscat(buffer, yytext); }