[TINKERPOP-3151] Allow floats with no leading digits#3558
Merged
Cole-Greer merged 1 commit intoJul 24, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.7-dev #3558 +/- ##
=============================================
+ Coverage 75.49% 75.53% +0.03%
- Complexity 13161 13178 +17
=============================================
Files 1092 1093 +1
Lines 67208 67233 +25
Branches 7391 7395 +4
=============================================
+ Hits 50742 50784 +42
+ Misses 13837 13828 -9
+ Partials 2629 2621 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
VOTE +1 pending comment resolution |
Assisted-by: Claude Code:claude-opus-4-8
kirill-stepanishin
force-pushed
the
allow-float-literals-without-leading-digit
branch
from
July 24, 2026 00:18
e453c90 to
4d33d95
Compare
Contributor
|
VOTE +1, merging as CTR |
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.
https://issues.apache.org/jira/browse/TINKERPOP-3151
Makes the leading digit optional in float literals, so forms like
.5,.5f, and.5mparse, aligning the Gremlin grammar with Groovy.Changes:
DecimalFloatingPointLiteralalternative for the leading-dot form. Added aRANGE:'..'token so1..5still tokenizes correctly (otherwise..gets swallowed into a.5float), and pointedgenericLiteralRangeat it, with a matching index fix inGenericLiteralVisitor.ValidFloatLiteralTestcases and Gherkin scenariosg_injectXpoint5X/fX/dX, plusg_injectX1to5Xto cover the newRANGEtoken. Regenerated the Python/JS/Go/.NET GLV feature files.g_injectXpoint5fXbecause the .NET translator emits a bare0.5, dropping the float type on round-trip (a pre-existing limitation only .NET's strict typing surfaces, not fixing it here).