Skip to content

Commit 1a9d551

Browse files
committed
fix 311
1 parent 152818b commit 1a9d551

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/components/internals.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ function parse_importexport_item(ps, is_colon = false)
364364
pushtotrivia!(a, accept_rparen(ps))
365365
a
366366
elseif kindof(ps.nt) === Tokens.EX_OR
367-
@closer ps :comma parse_expression(ps)
367+
parse_unary(ps, INSTANCE(next(ps)))
368368
elseif !is_colon && isoperator(ps.nt)
369369
next(ps)
370370
EXPR(:OPERATOR, ps.nt.startbyte - ps.t.startbyte, 1 + ps.t.endbyte - ps.t.startbyte, val(ps.t, ps))

test/parser.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,4 +1328,8 @@ end
13281328
x, ps = CSTParser.parse(CSTParser.ParseState("""import notvar"papa" """), true)
13291329
@test ps.errored == true
13301330
end
1331+
1332+
@testset "#311" begin
1333+
@test test_expr(raw"import a.$b.c")
1334+
end
13311335
end

0 commit comments

Comments
 (0)