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

Experiment: Make macros bind stronger than commas within parentheses #212

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

c42f
Copy link
Member

@c42f c42f commented Mar 3, 2023

As discussed in JuliaLang/julia#36547

That is, f(@x a, b) parses as

(call f (macrocall a) b)

rather than

(call f (macrocall (tupel a b)))

Unfortunately, this is mildly breaking, due to such strange syntax as (@unpack a,b = c)

@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Merging #212 (0a0ffa3) into main (2a0efad) will increase coverage by 0.00%.
The diff coverage is 90.00%.

@@           Coverage Diff           @@
##             main     #212   +/-   ##
=======================================
  Coverage   96.68%   96.68%           
=======================================
  Files          14       14           
  Lines        4007     4008    +1     
=======================================
+ Hits         3874     3875    +1     
  Misses        133      133           
Impacted Files Coverage Δ
src/parse_stream.jl 96.35% <86.66%> (ø)
src/parser.jl 98.25% <100.00%> (+<0.01%) ⬆️
src/parser_api.jl 88.40% <100.00%> (ø)

@c42f c42f marked this pull request as draft March 3, 2023 22:26
@c42f c42f force-pushed the c42f/macro-comma-binding branch 2 times, most recently from bb5a263 to 244be72 Compare May 12, 2023 06:30
c42f and others added 3 commits May 13, 2023 05:40
That is, `f(@x a, b)` parses as

    (call f (macrocall a) b)

rather than

    (call f (macrocall (tupel a b)))

Unfortunately, this is mildly breaking, due to such strange syntax as
`(@unpack a,b = c)`
Also enable it within concatenation syntax for consistency
@c42f c42f force-pushed the c42f/macro-comma-binding branch from 9863bb4 to 0a0ffa3 Compare May 12, 2023 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant