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) {