Skip to content

Commit 82cdea9

Browse files
committed
Don't add line statements unnecessarily
1 parent 101b254 commit 82cdea9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/JuliaInterpreter.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,12 @@ function split_expressions!(modexs, docexprs, lex::Expr, mod::Module, ex::Expr;
483483
end
484484
else
485485
if isempty(lex.args)
486-
push!(lex.args, isexpr(ex, :macrocall) ? ex.args[2] : LineNumberNode(0, Symbol(filename)))
486+
push!(modexs, (mod, copy(ex)))
487+
else
488+
push!(lex.args, ex)
489+
push!(modexs, (mod, copy(lex)))
490+
empty!(lex.args)
487491
end
488-
push!(lex.args, ex)
489-
push!(modexs, (mod, copy(lex)))
490-
empty!(lex.args)
491492
end
492493
return modexs, docexprs
493494
end

0 commit comments

Comments
 (0)