Repository navigation
Improve lexer - #4551
Merged
Merged
Improve lexer#4551
Conversation
Contributor
Test ReportTest Results
Code Coverage (Java 25)
|
bbakerman
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Oversized numeric literals are now rejected while the lexer is matching them, before it scans the entire literal or converts it to an arbitrary-precision number. The configured numeric-character limit also stops long malformed exponents.
The lexer throws an internal exception carrying the start line, column, and configured limit.
Parser.parseImpltranslates it into the existing localizedParseCancelledTooManyNumericLiteralCharactersException, preserving source mapping and normal GraphQL error reporting. This removes the numeric-limit callback fromSafeTokenSource, its fallback rethrow, and the synthetic token/text copy previously used to invoke the callback.Regression coverage checks numeric boundaries and early lexing cancellation, source locations across multiple SDL sources, localized messages, standalone value parsing, and GraphQL execution returning an
InvalidSyntaxErrorwithout invoking a data fetcher. The callback-specific tests are removed because that contract no longer exists.NumericLexerBenchmarkcovers small valid input, many small numbers, a large integer, and a malformed exponent.Validation:
5bdf8e14d: Java 17/21/25 tests and TestNG, build checks, Javadoc, jcstress, file validation, and the per-class coverage gate.