Skip to content

Commit 07b97cc

Browse files
committed
Fix lineno type in calling Core.Compiler.fl_parse
1 parent 72fee06 commit 07b97cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hooks.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ end
4646
# https://github.com/JuliaLang/julia/pull/43876
4747
# Prior to this, the following signature was needed:
4848
function core_parser_hook(code, filename, offset, options)
49-
core_parser_hook(code, filename, LineNumberNode(0), offset, options)
49+
core_parser_hook(code, filename, 1, offset, options)
5050
end
5151

5252
# Debug log file for dumping parsed code
@@ -96,6 +96,7 @@ function _core_parser_hook(code, filename, lineno, offset, options)
9696
e = Expr(:error, ParseError(SourceFile(code, filename=filename), stream.diagnostics))
9797
ex = options === :all ? Expr(:toplevel, e) : e
9898
else
99+
# FIXME: Add support to lineno to this tree build (via SourceFile?)
99100
ex = build_tree(Expr, stream, filename=filename, wrap_toplevel_as_kind=K"None")
100101
if Meta.isexpr(ex, :None)
101102
# The None wrapping is only to give somewhere for trivia to be

0 commit comments

Comments
 (0)