优化代码提示

This commit is contained in:
mxd
2021-08-31 06:51:03 +08:00
parent e11076343a
commit 7d063e86b3

View File

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