parser: track @namespace context in AST pretty-printing#66
Merged
Alonely0 merged 1 commit intoJul 6, 2026
Merged
Conversation
Collaborator
|
I was just finished working on this 🫠... I had said I was working on this issue. I went the hard route and just refactored everything not to use Display to avoid the thread_local and shenanigans. I ended up making a macro just for it not to explode in size tho. |
Collaborator
|
Let me at least salvage the tests... This frustrates me a lot because I really hate effort going to waste. Please, next time check out with people if you want to take issues that are assigned to them. Makes collaboration easier as well :) |
a40a9fd to
b827a46
Compare
Identifiers are fully qualified at parse time, but Display was emitting awk:: prefixes and dropping @namespace directives. Pretty-print now tracks the active namespace, omits redundant qualifiers, restores @namespace for non-awk scopes, and fixes Delete debug formatting to use Debug for indices. Closed: uutils#39
b827a46 to
a3a4b19
Compare
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.
Identifiers are fully qualified at parse time, but Display was emitting awk:: prefixes and dropping @namespace directives. Pretty-print now tracks the active namespace, omits redundant qualifiers, restores @namespace for non-awk scopes, and fixes Delete debug formatting to use Debug for indices.
Closed: #39