From 3bba1405ca1d65e8657e4b0cba5a6165958e43cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=A1=E6=B7=A1?= <64854204@qq.com> Date: Tue, 11 Sep 2018 16:01:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=9A=8Fvscode=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 99bcde3..585ff97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "luaide-lite", - "version": "0.1.5", + "version": "0.1.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 816cff4..f9dc104 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "icon": "res/logo.png", "categories": [ - "Languages", + "Programming Languages", "Debuggers", "Snippets" ], @@ -405,4 +405,4 @@ "vscode-languageclient": "^3.1.0", "rd": "^1.1.2" } -} \ No newline at end of file +} From 9aea622b6673d9978718c9063d1cb1a66b32854b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=A1=E6=B7=A1?= <64854204@qq.com> Date: Wed, 12 Sep 2018 10:31:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8F=98=E9=87=8F=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E4=B8=AD=E6=96=87=EF=BC=8C=E6=96=B9=E4=BE=BF=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E4=BB=A3=E7=A0=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/formater/TextFormat.ts | 5 +++-- src/parser/LParseHelper.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/formater/TextFormat.ts b/src/formater/TextFormat.ts index 6f7b732..14f434a 100644 --- a/src/formater/TextFormat.ts +++ b/src/formater/TextFormat.ts @@ -1160,11 +1160,12 @@ export class TextFormat { } private isIdentifierStart(charCode): boolean { - return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode; + //u4e00-u9fa5 (中文) + return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 0x4e00 && charCode <= 0x9fa5); } private isIdentifierPart(charCode): boolean { - return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 48 && charCode <= 57); + return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 48 && charCode <= 57) || (charCode >= 0x4e00 && charCode <= 0x9fa5); } private isDecDigit(charCode) { diff --git a/src/parser/LParseHelper.ts b/src/parser/LParseHelper.ts index e285c32..41cd409 100644 --- a/src/parser/LParseHelper.ts +++ b/src/parser/LParseHelper.ts @@ -606,11 +606,12 @@ export class LParseHelper { } private isIdentifierStart(charCode): boolean { - return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode; + //u4e00-u9fa5 (中文) + return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 0x4e00 && charCode <= 0x9fa5); } private isIdentifierPart(charCode): boolean { - return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 48 && charCode <= 57); + return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 48 && charCode <= 57) || (charCode >= 0x4e00 && charCode <= 0x9fa5); } private isDecDigit(charCode) {