Skip to content

Commit 6ce9a4d

Browse files
authored
Add missing JuliaSyntax 1.0 fixes (#674)
1 parent c97c21f commit 6ce9a4d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
authors = ["Valentin Churavy <[email protected]> and contributors"]
22
name = "Cthulhu"
33
uuid = "f68482b8-f384-11e8-15f7-abe071a5a75f"
4-
version = "2.17.9"
4+
version = "2.17.10"
55

66
[compat]
77
CodeTracking = "0.5, 1, 2"

src/codeview.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function descend_into_callsite!(io::IO, tsn::TypedSyntaxNode;
285285
iswarn::Bool, hide_type_stable::Bool, type_annotations::Bool)
286286
sig, body = children(tsn)
287287
# We empty the body when filling kwargs
288-
istruncated = isempty(children(body))
288+
istruncated = is_leaf(body)
289289
idxend = istruncated ? JuliaSyntax.last_byte(sig) : lastindex(tsn.source)
290290
if !istruncated # If method only fills in default arguments
291291
printstyled(io, tsn; type_annotations, iswarn, hide_type_stable, idxend)
@@ -331,7 +331,7 @@ function add_callsites!(d::AbstractDict, visited_cis::AbstractSet, diagnostics::
331331
isnothing(tsn) && return nothing
332332
sig, body = children(tsn)
333333
# We empty the body when filling kwargs
334-
istruncated = isempty(children(body))
334+
istruncated = is_leaf(body)
335335
istruncated && return nothing
336336
# We add new callsites unless we would have multiple callsites for the same source definition,
337337
# e.g. if f(x) = x is called with different types we print nothing.

0 commit comments

Comments
 (0)