From 8ec11af3ff9f552198921d7f3c5f15647e7c7f01 Mon Sep 17 00:00:00 2001 From: hufeng Date: Fri, 8 Apr 2022 17:39:39 +0800 Subject: [PATCH] fixed b62b69c from https://gitee.com/hufeng20/ark_ts2abc/pulls/193 Fix invalid function name with `\` Signed-off-by: hufeng Change-Id: I430f48ba5a5f87a68d282415554345cb68e33d51 --- ts2panda/src/compilerDriver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts2panda/src/compilerDriver.ts b/ts2panda/src/compilerDriver.ts index bbec2af11ba..2613de96dfd 100644 --- a/ts2panda/src/compilerDriver.ts +++ b/ts2panda/src/compilerDriver.ts @@ -370,7 +370,7 @@ export class CompilerDriver { throw new Error("the function name is missing from the name map"); } - if (name.lastIndexOf(".") != -1) { + if (name.lastIndexOf(".") != -1 || name.lastIndexOf("\\") != -1) { name = `#${this.getFuncId(funcNode)}#` } } -- Gitee