Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/integration/expr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,10 @@ end
return retexpr
end

function build_tree(::Type{Expr}, stream::ParseStream; filename=nothing, first_line=1, kws...)
function build_tree(::Type{Expr}, stream::ParseStream;
filename=nothing, first_line=1,
# unused, but required since `_parse` is written generic
keep_parens=false)
source = SourceFile(stream, filename=filename, first_line=first_line)
return build_tree(Expr, stream, source)
end
Expand Down
4 changes: 3 additions & 1 deletion src/porcelain/green_node.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ function GreenNode(cursor::GreenTreeCursor)
end
end

function build_tree(T::Type{GreenNode}, stream::ParseStream; kws...)
function build_tree(::Type{GreenNode}, stream::ParseStream;
# unused, but required since `_parse` is written generic
filename=nothing, first_line=1, keep_parens=false)
cursor = GreenTreeCursor(stream)
if has_toplevel_siblings(cursor)
# There are multiple toplevel nodes, e.g. because we're using this
Expand Down
2 changes: 1 addition & 1 deletion src/porcelain/syntax_tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ end
Base.copy(data::SyntaxData) = SyntaxData(data.source, data.raw, data.byte_end, data.val)

function build_tree(::Type{SyntaxNode}, stream::ParseStream;
filename=nothing, first_line=1, keep_parens=false, kws...)
filename=nothing, first_line=1, keep_parens=false)
source = SourceFile(stream, filename=filename, first_line=first_line)
cursor = RedTreeCursor(stream)
if has_toplevel_siblings(cursor)
Expand Down
Loading