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

support syntax macro OtherPackage.theirmacro(args...) ... end #54488

Open
schlichtanders opened this issue May 16, 2024 · 0 comments
Open

support syntax macro OtherPackage.theirmacro(args...) ... end #54488

schlichtanders opened this issue May 16, 2024 · 0 comments
Labels
parser Language parsing and surface syntax

Comments

@schlichtanders
Copy link

As a outcome from this discourse issue https://discourse.julialang.org/t/how-to-define-a-macro-via-package-extension/114218/5
I want to open an issue to track that the syntax to extend functions and macros do not match.

While extending functions and macros works the same when importing them (like import OtherPackage: @theirmacro), using qualified definitions only works for functions.

works:

function OtherPackage.theirfunction(args...)
    # works
end

doesn't work:

macro OtherPackage.theirmacro(args...)
    # fails with `ERROR: syntax: invalid macro definition ...`
end

As the functionality of extending is already support for both, it would be great if also the syntax support is consistent.

@tecosaur tecosaur added the parser Language parsing and surface syntax label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Language parsing and surface syntax
Projects
None yet
Development

No branches or pull requests

2 participants