Tweaks to expr-conversion for JuliaLowering#569
Merged
Conversation
Keno
approved these changes
Jul 1, 2025
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #569 +/- ##
==========================================
- Coverage 95.56% 88.11% -7.45%
==========================================
Files 15 15
Lines 4441 3265 -1176
==========================================
- Hits 4244 2877 -1367
- Misses 197 388 +191 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Two small and related changes:
1. The node->expr conversion shouldn't peek at provenance from SyntaxNode or
SyntaxTree, so fix the couple of places we do this. We've always had
provenance available, but we won't once there are nodes constructed from
exprs for compatibility.
2. JuliaLowering currently relies on putting its own data structures through the
JuliaSyntax node->expr machine. Remove a couple of type annotations and
reinstate `_expr_leaf_val` so that this is possible.
A JuliaLowering.SyntaxTree may have a line number node instead of a SourceFile
as its location. Pushing the linenode through `node_to_expr` is strange
and temporary, according to comments.
c42f
pushed a commit
to JuliaLang/julia
that referenced
this pull request
Oct 17, 2025
…#569) * Tweaks to expr-conversion for JuliaLowering Two small and related changes: 1. The node->expr conversion shouldn't peek at provenance from SyntaxNode or SyntaxTree, so fix the couple of places we do this. We've always had provenance available, but we won't once there are nodes constructed from exprs for compatibility. 2. JuliaLowering currently relies on putting its own data structures through the JuliaSyntax node->expr machine. Remove a couple of type annotations and reinstate `_expr_leaf_val` so that this is possible. * Remove source's type annotation too A JuliaLowering.SyntaxTree may have a line number node instead of a SourceFile as its location. Pushing the linenode through `node_to_expr` is strange and temporary, according to comments.
topolarity
pushed a commit
to JuliaLang/julia
that referenced
this pull request
Nov 14, 2025
…#569) * Tweaks to expr-conversion for JuliaLowering Two small and related changes: 1. The node->expr conversion shouldn't peek at provenance from SyntaxNode or SyntaxTree, so fix the couple of places we do this. We've always had provenance available, but we won't once there are nodes constructed from exprs for compatibility. 2. JuliaLowering currently relies on putting its own data structures through the JuliaSyntax node->expr machine. Remove a couple of type annotations and reinstate `_expr_leaf_val` so that this is possible. * Remove source's type annotation too A JuliaLowering.SyntaxTree may have a line number node instead of a SourceFile as its location. Pushing the linenode through `node_to_expr` is strange and temporary, according to comments.
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.
Two small and related changes:
The node->expr conversion shouldn't peek at provenance from SyntaxNode or SyntaxTree, so fix the couple of places we do this. We've always had provenance available, but we won't once there are nodes constructed from exprs for compatibility.
JuliaLowering currently relies on putting its own data structures through the JuliaSyntax node->expr machine. Remove a couple of type annotations and reinstate
_expr_leaf_valso that this is possible.This change should make JuliaSyntax compatible with JuliaLowering again after #560, though some tweaks need to be done on JuliaLowering's end before JETLS can bump deps (cc @aviatesk)