Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

c42f
Copy link

@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
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