Skip to content

Adapt @with to work with minor change from JuliaSyntax.jl#6

Open
c42f wants to merge 1 commit into
JuliaPreludes:masterfrom
c42f:c42f/fix-macro-do-kws
Open

Adapt @with to work with minor change from JuliaSyntax.jl#6
c42f wants to merge 1 commit into
JuliaPreludes:masterfrom
c42f:c42f/fix-macro-do-kws

Conversation

@c42f
Copy link
Copy Markdown

@c42f c42f commented Jun 11, 2023

The reference parser parses the = in @x(y=1) as Expr(:(=)) but the = in @x(y=1) do y end as Expr(:kw). In JuliaSyntax, we've corrected this inconsistency as a minor change to the parsing rules, but this breaks the @with macro in this package (And one macro in Fluxperimental - the only two cases in General.)

Found as part of the integration work in JuliaLang/julia#46372

@c42f c42f changed the title Adapt @compact to work with minor change from JuliaSyntax.jl Adapt @with to work with minor change from JuliaSyntax.jl Jun 13, 2023
@c42f
Copy link
Copy Markdown
Author

c42f commented Jun 13, 2023

Oops, sorry for the weird copy and paste in the message, I forgot to change it from the sibling PR at FluxML/Fluxperimental.jl#9

The reference parser parses the `=` in `@x(y=1)` as `Expr(:(=))` but the `=` in `@x(y=1) do y end` as `Expr(:kw)`.  In JuliaSyntax, we've corrected this inconsistency as a minor change to the parsing rules, but this breaks the `@with` macro in this package (And one macro in `Fluxperimental` - the only two cases in General.)

Found as part of the integration work in JuliaLang/julia#46372
@c42f c42f force-pushed the c42f/fix-macro-do-kws branch from 1edac50 to 6f175d3 Compare June 13, 2023 02:05
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