Skip to content

Commit cd40c69

Browse files
authored
Merge pull request #330 from julia-vscode/sp/fix-at-doc-eof-again
fix at-doc at EOF again
2 parents 71e3f31 + 492aea8 commit cd40c69

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/components/internals.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ function parse_macrocall(ps::ParseState)
305305
end
306306
push!(args, a)
307307

308-
if valof(mname) == "@doc" && ps.t.endpos[1] + 1 == ps.nt.startpos[1] && length(args) == 3
308+
if valof(mname) == "@doc" && ps.t.endpos[1] + 1 == ps.nt.startpos[1] && length(args) == 3 && kindof(ps.nt) !== Tokens.ENDMARKER
309309
a = parse_expression(ps)
310310
push!(args, a)
311311
break

test/parser.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,9 @@ end
968968
@test """
969969
@doc(foo)
970970
""" |> test_expr
971+
@test """
972+
@doc foo
973+
""" |> test_expr
971974
end
972975

973976
@testset "braces" begin

0 commit comments

Comments
 (0)