Fix issue with f-strings with multiple format blocks

This commit is contained in:
K. Lange 2021-01-22 08:25:20 +09:00
parent d4b8ed6747
commit 195bd33a19

View File

@ -1771,6 +1771,7 @@ static void string(int type) {
c += 2;
} else if (isFormat && *c == '{') {
emitConstant(OBJECT_VAL(krk_copyString(stringBytes,stringLength)));
if (atLeastOne) emitByte(OP_ADD);
stringLength = 0;
KrkScanner beforeExpression = krk_tellScanner();
Parser parserBefore = parser;