Browse Source

优化代码提示

mxd 3 năm trước cách đây
mục cha
commit
7d063e86b3
1 tập tin đã thay đổi với 1 bổ sung9 xóa
  1. 1 9
      magic-editor/src/console/src/scripts/parsing/index.js

+ 1 - 9
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) {