diff --git a/src/components/operators.jl b/src/components/operators.jl index 2a4f6bfb..4bc10506 100644 --- a/src/components/operators.jl +++ b/src/components/operators.jl @@ -479,7 +479,8 @@ function parse_operator(ps::ParseState, ret::EXPR, op::EXPR) ) || headof(ret) === :do || is_dot(headof(ret)) || - is_prime(headof(ret)) + is_prime(headof(ret)) || + isinterpolant(ret) if valof(op) == "'" ret = EXPR(op, EXPR[ret], nothing) else diff --git a/test/parser/test_parser.jl b/test/parser/test_parser.jl index e5045110..18676de5 100644 --- a/test/parser/test_parser.jl +++ b/test/parser/test_parser.jl @@ -197,7 +197,7 @@ end @test "m!=m" |> test_expr @test "+(x...)" |> test_expr @test "+(promote(x,y)...)" |> test_expr - @test "\$(x...)" |> test_expr # + @test "\$(x...)" |> test_expr @test "ccall(:gethostname, stdcall, Int32, ())" |> test_expr @test "@inbounds @ncall a b c" |> test_expr @test "(a+b)``" |> test_expr @@ -1102,3 +1102,13 @@ end @test test_expr("global a, b") @test test_expr("global a, b = 2") end + +@testitem "dollar quote with prime" begin + using CSTParser: remlineinfo! + include("../shared.jl") + + @test raw":($a'+2')" |> test_expr + @test raw":($(a)'+2')" |> test_expr + @test raw":($a')" |> test_expr + @test raw":($(a)')" |> test_expr +end