Skip to content

Commit 074d6df

Browse files
mlechuaviatesk
andcommitted
Suggestions from code review
Co-authored-by: Shuhei Kadowaki <[email protected]>
1 parent 055ca9b commit 074d6df

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/completions.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import JuliaSyntax: @K_str, @KSet_str, JuliaSyntax as JS
88
Like `Base.unique`, but over node ids, and with this comment promising that the
99
lowest-index copy of each node is kept.
1010
"""
11-
function unique(sl::JL.SyntaxList)
11+
function deduplicate_syntaxlist(sl::JL.SyntaxList)
1212
sl2 = JL.SyntaxList(sl.graph)
1313
seen = Set{JL.NodeId}()
1414
for st in sl
@@ -46,7 +46,7 @@ function byte_ancestors(st0::SyntaxTree, b::Int, b2=b)
4646
return JL.SyntaxList(st0._graph)
4747
end
4848
# delete later duplicates when sorted parent->child
49-
out = unique(byte_ancestors_(st0, JL.SyntaxList(st0._graph, [st0._id])))
49+
out = deduplicate_syntaxlist(byte_ancestors_(st0, JL.SyntaxList(st0._graph, [st0._id])))
5050
return reverse(out)
5151
end
5252

@@ -306,10 +306,5 @@ function handle_CompletionRequest(s::ServerState, msg::CompletionRequest)
306306
CompletionList(
307307
; isIncomplete = true,
308308
items,
309-
# itemDefaults = (
310-
# ; data = (
311-
# ; position = msg.params.position,
312-
# translated_pos = b,
313-
# untranslated_pos = offset_to_xy(fi, b)))
314309
)))
315310
end

0 commit comments

Comments
 (0)