Skip to content

Improve messages for syntax error in @addr expression #64

@marcoct

Description

@marcoct

Forgetting a comma in an @addr expression:

@gen function foo()
    @addr(normal(0, 1) :x)
end

results in the following error:

ERROR: LoadError: foo
MethodError: no method matching @addr(::LineNumberNode, ::Module, ::Expr)
Closest candidates are:
  @addr(::LineNumberNode, ::Module, ::Expr, ::Any) at /home/marcoct/dev/Gen/src/dsl_common.jl:4
in expression starting at REPL[3]:2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions