diff --git a/src/compiler/tests/literals.test.ts b/src/compiler/tests/literals.test.ts index c398fae..2b102a4 100644 --- a/src/compiler/tests/literals.test.ts +++ b/src/compiler/tests/literals.test.ts @@ -258,7 +258,7 @@ describe('curly strings', () => { test('interpolation edge cases', () => { expect(`{[a=1 b=2 c={wild}]}`).toEvaluateTo(`[a=1 b=2 c={wild}]`) expect(`a = 1;b = 2;c = 3;{$a $b $c}`).toEvaluateTo(`1 2 3`) - expect(`a = 1;b = 2;c = 3;{$a$b$c}`).toEvaluateTo(`123`) + expect(`a = 1;b = 2;c = 3;{$(a)$(b)$(c)}`).toEvaluateTo(`123`) }) }) diff --git a/src/parser/curlyTokenizer.ts b/src/parser/curlyTokenizer.ts index 95e5af6..9b35749 100644 --- a/src/parser/curlyTokenizer.ts +++ b/src/parser/curlyTokenizer.ts @@ -38,7 +38,7 @@ export const tokenizeCurlyString = (value: string): (string | [string, SyntaxNod const input = value.slice(start + 2, pos) // skip '$(' tokens.push([input, parse(input)]) - start = ++pos // skip ')' + start = pos + 1 // start after ')' } else { char = value[++pos] if (!char) break