gcv / julia-snail

An Emacs development environment for Julia
GNU General Public License v3.0
230 stars 21 forks source link

can't load macro due to parser error #31

Closed dahtah closed 3 years ago

dahtah commented 4 years ago

MWE: try loading the definition for "@show" using julia-snail, ie.

macro show(exs...)
    blk = Expr(:block)
    for ex in exs
        push!(blk.args, :(println($(sprint(show_unquoted,ex)*" = "),
                                  repr(begin value=$(esc(ex)) end))))
    end
    isempty(exs) || push!(blk.args, :value)
    return blk
end

then C-c C-k (or C-c C-c) results in an error. Stack trace is a mess but it seems parser-related. I think it gets confused around the weird syntax in the println part.

gcv commented 3 years ago

Fixed with the parser changes introduced in #33 and 34498596550b0f81.