diff --git a/langserver/java/body-parser3.js b/langserver/java/body-parser3.js index 3a55a8c..833048d 100644 --- a/langserver/java/body-parser3.js +++ b/langserver/java/body-parser3.js @@ -2333,7 +2333,9 @@ class LiteralNumber extends LiteralValue { switch (this.numberKind) { case 'hex-number-literal': case 'int-number-literal': - return BigInt(this.name); + // unlike parseInt, BigInt doesn't like invalid characters, so + // ensure we strip any trailing long specifier + return BigInt(this.name.match(/(.+?)[lL]?$/)[1]); } return null; }