Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expr op prime not recognized correctly #319

Open
o314 opened this issue Oct 5, 2021 · 3 comments
Open

expr op prime not recognized correctly #319

o314 opened this issue Oct 5, 2021 · 3 comments

Comments

@o314
Copy link

o314 commented Oct 5, 2021

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
@davidanthoff
Copy link
Member

Is this still an issue, or can it be closed?

@o314
Copy link
Author

o314 commented Oct 15, 2022

dup of 316 answer
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)

@pfitzseb
Copy link
Member

pfitzseb commented Oct 17, 2022

This is a tokenizer issue. I don't think we'll ever end up fixing that in this package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants