From 3afa10b1a04920e8aec58af5b785489fa522e14c Mon Sep 17 00:00:00 2001 From: Gusarich Date: Tue, 26 Mar 2024 14:26:52 +0300 Subject: [PATCH] fix --- src/generator/writers/writeExpression.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generator/writers/writeExpression.ts b/src/generator/writers/writeExpression.ts index 2d5a45d32..3e759d098 100644 --- a/src/generator/writers/writeExpression.ts +++ b/src/generator/writers/writeExpression.ts @@ -132,7 +132,7 @@ export function writeExpression(f: ASTExpression, ctx: WriterContext): string { // if (f.kind === 'string') { - const s = f.value.replace(/\\\\|\\\"|\\n|\\r|\\t|\\b|\\f/g, (match) => { + const s = f.value.replace(/\\\\|\\"|\\n|\\r|\\t|\\b|\\f/g, (match) => { switch (match) { case '\\\\': return '\\'; @@ -152,7 +152,7 @@ export function writeExpression(f: ASTExpression, ctx: WriterContext): string { return match; } }); - let id = writeString(s, ctx); + const id = writeString(s, ctx); ctx.used(id); return `${id}()`; }