Move SyntaxGraph/SyntaxTree from JuliaLowering to JuliaSyntax#60370
Merged
topolarity merged 6 commits intoJuliaLang:masterfrom Dec 12, 2025
Merged
Move SyntaxGraph/SyntaxTree from JuliaLowering to JuliaSyntax#60370topolarity merged 6 commits intoJuliaLang:masterfrom
SyntaxGraph/SyntaxTree from JuliaLowering to JuliaSyntax#60370topolarity merged 6 commits intoJuliaLang:masterfrom
Conversation
- Move `SyntaxTree`->`Expr` hacks to compat.jl
- Move `@SyntaxTree` to utils.jl
- Move `Base.show(::SyntaxTree)` to utils.jl (odd, but currently depends on
lowering-only `Kind`s)
- Move AST creation utilities from ast.jl to syntax_graph.jl. There's no good
way of creating a parsed SyntaxTree otherwise.
topolarity
approved these changes
Dec 11, 2025
Member
topolarity
left a comment
There was a problem hiding this comment.
Looks good to me. Basically no code changes, so easy review 👍
This feels like the right direction to go, but I'll give @c42f a chance to chime in about her thoughts before merging
Member
|
Already essentially passed all CI (there was spurious error on Windows), so merging this as-is. |
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.
This is purely a code movement PR. @c42f has noted that
SyntaxTreemay eventually replaceSyntaxNodeand should be part of JuliaSyntax. Doing this code movement before #59870 would have been a mess, though, since the API toSyntaxTreeis still under development.Easiest to review commit-by-commit. Summary of changes:
syntax_graph.jland associated tests to JuliaSyntax, including parts ofast.jlthat are necessary to construct trees (needed for parsing toSyntaxTree) and excluding anything that needs to know about loweringKinds orBindingsSyntaxTreeis unstable/JuliaLowering-only for now.