You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make DSLs one needs to use a syntax that is parseable, so that macros can ingest it
I'm trying to make a @mymacro distinguish between @mymacro((x; kw1=1, kw2=2) -> ...) and @mymacro([x; kw1=1, kw2=2] -> ...). I can make it work with @mymacro([x, y; kw1=1, kw2=2] -> ...) but not with a single positional argument.
The reason is that :([x; y, z]) is not parseable, but :([x, y; z, w]) and even:([x,; y, z]) are
julia> :([x; y, z])
ERROR: ParseError:
# Error @ REPL[1]:1:8
:([x; y, z])
# ╙ ── unexpected comma in array expression
Stacktrace:
[1] top-level scope
@ none:1
julia> :([x,; y, z])
:([$(Expr(:parameters, :y, :z)), x])
After confirming on slack that this change would not be breaking, I'd like to propose to make :([x; y, z]) parseable
The text was updated successfully, but these errors were encountered:
To make DSLs one needs to use a syntax that is parseable, so that macros can ingest it
I'm trying to make a
@mymacro
distinguish between@mymacro((x; kw1=1, kw2=2) -> ...)
and@mymacro([x; kw1=1, kw2=2] -> ...)
. I can make it work with@mymacro([x, y; kw1=1, kw2=2] -> ...)
but not with a single positional argument.The reason is that
:([x; y, z])
is not parseable, but:([x, y; z, w])
and even:([x,; y, z])
areAfter confirming on slack that this change would not be breaking, I'd like to propose to make
:([x; y, z])
parseableThe text was updated successfully, but these errors were encountered: