From 7d063e86b37312e5ee1dd323d5287aa85c8acd57 Mon Sep 17 00:00:00 2001 From: mxd <838425805@qq.com> Date: Tue, 31 Aug 2021 06:51:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- magic-editor/src/console/src/scripts/parsing/index.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/magic-editor/src/console/src/scripts/parsing/index.js b/magic-editor/src/console/src/scripts/parsing/index.js index 2447b1ab..43051c19 100644 --- a/magic-editor/src/console/src/scripts/parsing/index.js +++ b/magic-editor/src/console/src/scripts/parsing/index.js @@ -291,15 +291,7 @@ class CharacterStream { } matchDigit(consume) { - if (this.index >= this.end) - return false; - let c = this.source.charAt(this.index); - if (c!== ' ' && !isNaN(c)) { - if (consume) - this.index++; - return true; - } - return false; + return this.matchAny('0123456789', consume) } matchIdentifierStart(consume) {