$ can be in an identifier now
This commit is contained in:
parent
69b2297280
commit
491e37a7f8
|
|
@ -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`)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user