Skip to content

Emit LineNumberNodes in Expr conversion#29

Merged
c42f merged 3 commits intomainfrom
cjf/core-parsing-fixes
Jun 22, 2022
Merged

Emit LineNumberNodes in Expr conversion#29
c42f merged 3 commits intomainfrom
cjf/core-parsing-fixes

Conversation

@c42f
Copy link
Copy Markdown
Member

@c42f c42f commented Jun 22, 2022

Proper line number generation in blocks, top level, etc, and pass file names through the core parser hook function. This isn't 100% compatible with the flisp parser's line numbers as the flisp parser has a few weird quirks in some corner cases. Hopefully it's close enough, though.

Seems to be enough to get Revise to work for JuliaSyntax-based sysimages 🤞 At least in simple cases.

c42f added 3 commits June 22, 2022 22:30
Instead of baking this into the parser output, we treat this extra block
as an Expr-specific oddity and add it during Expr conversion.
This should give proper line number information when using JuliaSyntax
via the Julia runtime.  And hopefully allow tools like Revise.jl to work
reliably.
@c42f c42f force-pushed the cjf/core-parsing-fixes branch from 64aa946 to 0976ded Compare June 22, 2022 12:30
@c42f c42f merged commit 219d375 into main Jun 22, 2022
@c42f c42f deleted the cjf/core-parsing-fixes branch June 22, 2022 20:14
c42f added a commit to JuliaLang/julia that referenced this pull request Oct 17, 2025
…e-parsing-fixes

Emit `LineNumberNode`s in `Expr` conversion
topolarity pushed a commit to JuliaLang/julia that referenced this pull request Nov 14, 2025
…e-parsing-fixes

Emit `LineNumberNode`s in `Expr` conversion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant