CSTParser.jl
CSTParser.jl copied to clipboard
dot transpose op expr does not parse as expected
import CSTParser as C
using Test
_eval_or_ex(a) = try; a catch ex; ex end
_backtest_parse(s) = (s |> Meta.parse) == (s |> C.parse |> Expr)
_log_parse(s) = s |> Meta.parse |> Meta.show_sexpr
@test_broken """ :.' """ |> _backtest_parse # see trans-op @ julia-parser.scm
FYI
""" :.' """ |> _log_parse
returns
(:quote, #QuoteNode
:.'
)
Still an issue, or can be closed?
Still an issue @ CSTParser v3.3.6
@testset for (arg, exp) in eachrow([
""" :.' """ QuoteNode(:var".'") ; # issue 316
""" g <| 1 |> f """ Expr(:call, :<|, :g, Expr(:call, :|>, 1, :f)) ; # issue 318
""" :?' """ Expr(Symbol("'"), QuoteNode(:?)) # issue 319
])
@test Meta.parse(arg) == exp
@test_broken C.parse(arg) == exp
end
(should be included in runtests.jl)
Also a tokenizer issues. Won't be fixed in this package.