From b62b69c2b5fa65ed3acabcdc8a80a54f485ac94f Mon Sep 17 00:00:00 2001 From: hufeng Date: Fri, 8 Apr 2022 17:39:39 +0800 Subject: [PATCH] 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 07fc21b236..85c8b83566 100644 --- a/ts2panda/src/compilerDriver.ts +++ b/ts2panda/src/compilerDriver.ts @@ -371,7 +371,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