Skip to content

Throw Meta.ParseError from Meta.parse() in Julia 1.10#294

Merged
c42f merged 1 commit intomainfrom
c42f/julia-1-10-hook-updates
May 24, 2023
Merged

Throw Meta.ParseError from Meta.parse() in Julia 1.10#294
c42f merged 1 commit intomainfrom
c42f/julia-1-10-hook-updates

Conversation

@c42f
Copy link
Member

@c42f c42f commented May 24, 2023

New hooks added in JuliaLang/julia#46372 allow us to

  • Add JuliaSyntax.ParseError as the new detail field of Meta.ParseError, preserving the detailed error information and ability to overload showerror, without disrupting Base too much.
  • Return Expr(:incomplete, Meta.ParseError(...)) for incomplete expressions while having incomplete_tag still work.

New hooks added in JuliaLang/julia#46372 allow
us to

* Add `JuliaSyntax.ParseError` as the new detail field of
  `Meta.ParseError`, preserving the detailed error information and
  ability to overload `showerror`, without disrupting `Base` too much.
* Return `Expr(:incomplete, Meta.ParseError(...))` for incomplete
  expressions while having `incomplete_tag` still work.
@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #294 (46cfba9) into main (f5b287a) will decrease coverage by 0.05%.
The diff coverage is 54.54%.

@@            Coverage Diff             @@
##             main     #294      +/-   ##
==========================================
- Coverage   96.79%   96.74%   -0.05%     
==========================================
  Files          14       14              
  Lines        4083     4088       +5     
==========================================
+ Hits         3952     3955       +3     
- Misses        131      133       +2     
Impacted Files Coverage Δ
src/hooks.jl 78.85% <44.44%> (-0.56%) ⬇️
src/parser_api.jl 92.42% <100.00%> (ø)

@c42f c42f merged commit 890a62b into main May 24, 2023
@c42f c42f deleted the c42f/julia-1-10-hook-updates branch May 24, 2023 23:18
c42f added a commit to JuliaLang/julia that referenced this pull request Oct 17, 2025
…aSyntax.jl#294)

New hooks added in #46372 allow
us to

* Add `JuliaSyntax.ParseError` as the new detail field of
  `Meta.ParseError`, preserving the detailed error information and
  ability to overload `showerror`, without disrupting `Base` too much.
* Return `Expr(:incomplete, Meta.ParseError(...))` for incomplete
  expressions while having `incomplete_tag` still work.
topolarity pushed a commit to JuliaLang/julia that referenced this pull request Nov 14, 2025
…aSyntax.jl#294)

New hooks added in #46372 allow
us to

* Add `JuliaSyntax.ParseError` as the new detail field of
  `Meta.ParseError`, preserving the detailed error information and
  ability to overload `showerror`, without disrupting `Base` too much.
* Return `Expr(:incomplete, Meta.ParseError(...))` for incomplete
  expressions while having `incomplete_tag` still work.
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