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

Newline macros #475

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

Conversation

MasonProtter
Copy link

@MasonProtter MasonProtter commented Jul 26, 2024

This is my current attempt at #436, sorry it took me a little while to post it @c42f.

Lots of things work, but the main problem currently is that my criterion for detecting cases like (@foo x) is too broad. Specifically, cases like this aren't doing what we want:

julia> """
       (@foo function bar()
           @baz x
           y
       end)
       """ |> Meta.parse
:(#= none:1 =# @foo function bar()
          #= none:1 =#
          #= none:2 =#
          #= none:2 =# @baz x y
      end)

Basically, it's detecting that (@foo is matching the desired pattern, but then its also recursively applying the new parsing rule to @baz x and grabbing the y incorrectly.

I haven't yet figured out the right way to fix this.

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