Repository navigation
quote dot node identifiers that begin with a digit - #116
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #116 +/- ##
=======================================
Coverage 84.98% 84.98%
=======================================
Files 1 1
Lines 2337 2337
=======================================
Hits 1986 1986
Misses 351 351 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
any update? |
Owner
|
Makes sense. Thanks. |
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.
id() only quotes identifiers that aren't plain alphanumeric, with one narrow exception for the
0xhex-address prefix. Any other alphanumeric name that starts with a digit still goes out unquoted, so a function or module named like3d,1e5or123abclands unquoted where a dot node id belongs. dot lexes a digit-leading token as a numeral, so3dsplits into3andd: the node declaration and the edges referencing it resolve to different phantom nodes, and the real node is dropped or mislabeled.Widen the existing
0xguard to reject any identifier whose first character is a digit, routing these names through the quoted path. Keeping the check in id() covers every node id, edge endpoint and label from the single place they are all written. Pure integers get quoted too, which is harmless since a declaration and its references stay consistent.