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

Directly matching macrocall expressions #59

Closed
thautwarm opened this issue May 6, 2019 · 1 comment
Closed

Directly matching macrocall expressions #59

thautwarm opened this issue May 6, 2019 · 1 comment
Labels
propaganda about telling stories

Comments

@thautwarm
Copy link
Owner

Now, as the line number node contained in macrocall expressions

julia> dump(:(@f 1))
Expr
  head: Symbol macrocall
  args: Array{Any}((3,))
    1: Symbol @f
    2: LineNumberNode
      line: Int64 1
      file: Symbol REPL[1]
    3: Int64 1

We cannot use

@match :(@f 1) begin
   :(@f 1) => :okay
end

However, we can instead use

@match :(@f 1) begin
   :(@f $(::LineNumberNode) 1) => :okay
end

This should be a tip put in docs.

@thautwarm thautwarm added the propaganda about telling stories label May 6, 2019
@thautwarm
Copy link
Owner Author

done in v0.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
propaganda about telling stories
Projects
None yet
Development

No branches or pull requests

1 participant