Parse arr[end] differently from arr[var"end"]#537
Parse arr[end] differently from arr[var"end"]#537mlechu wants to merge 3 commits intoJuliaLang:mainfrom
Conversation
src/parser.jl
Outdated
| elseif check_identifiers && is_closing_token(ps, leading_kind) | ||
| # :(end) ==> (quote-: (error end)) | ||
| bump(ps, error="invalid identifier") | ||
| elseif ps.end_symbol && leading_kind in KSet"begin end" |
There was a problem hiding this comment.
Needs a version check on the parse syntax, since JuliaSyntax itself is not tied to a Julia version.
There was a problem hiding this comment.
Let's do 1.13 - we can change it later if we decide to backport.
|
I think the changes to So if you like we could merge this right away if you make sure the
Later you can make a separate PR if PkgEval deems the |
|
Thanks for the help!
Waiting on pkgeval before deciding whether to keep the Expr change. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #537 +/- ##
==========================================
- Coverage 96.18% 96.08% -0.10%
==========================================
Files 13 13
Lines 4032 4113 +81
==========================================
+ Hits 3878 3952 +74
- Misses 154 161 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Heya, I've created a branch https://github.com/JuliaLang/JuliaSyntax.jl/tree/pr-for-Base/537 to make this easier to move into Base To make use of the branch, you can use the following steps:
For example: # git clone git@github.com:JuliaLang/julia julia_dir
# cd julia_dir
git remote add JuliaSyntax git@github.com:JuliaLang/JuliaSyntax.jl
git fetch JuliaSyntax
git checkout pr-for-Base/537
git rebase origin/masterSorry this wasn't dealt with prior to the big move! |
Fixes a small issue present in both parsers (see discussion at JuliaLang/julia#57269) due to treating
begin/endin indexing expressions as normal identifiers.This would be a breaking change that goes with PR JuliaLang/julia#57368, which makes the same change to the lisp parser, and changes lowering to expect
Expr(:end)instead of a symbol.