diff --git a/src/mlstyle.jl b/src/mlstyle.jl index 4f3a06d..3eac03c 100644 --- a/src/mlstyle.jl +++ b/src/mlstyle.jl @@ -2,7 +2,11 @@ using MLStyle mlstyle(node) = @match node begin :({ $(kvs...) }) => - let f = @λ :($k : $v) -> Expr(:call, =>, string(k), mlstyle(v)) + let f = @λ begin + :($k : $v) -> Expr(:call, =>, string(k), mlstyle(v)) + :($k) -> Expr(:call, =>, string(k), mlstyle(k)) + end + Expr(:call, Dict, (f(kv) for kv in kvs if !(kv isa LineNumberNode))...) end :[$(elts...)] => Expr(:vect, map(mlstyle, elts)...)