Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: JuliaDebug/Cthulhu.jl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bfe840f7e6646accef64132ce6fff98715612cb4
Choose a base ref
..
head repository: JuliaDebug/Cthulhu.jl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f99d97c79d5eb14c23b19d58474f5a6605a93044
Choose a head ref
Showing with 2 additions and 5 deletions.
  1. +2 −5 TypedSyntax/src/node.jl
7 changes: 2 additions & 5 deletions TypedSyntax/src/node.jl
Original file line number Diff line number Diff line change
@@ -457,7 +457,6 @@ function getline(lt::Core.DebugInfo, i::Int)
end
return i
end

function getnextline(lt::Core.DebugInfo, i::Int, Δline)
while true
codeloc = Base.IRShow.getdebugidx(lt, i)
@@ -485,16 +484,14 @@ function getnextline(lt::Core.DebugInfo, i::Int, Δline)
return j == i ? typemax(Int) : j + Δline
end

else

else # VERSION < v"1.12.0-DEV.173"
function getline(lt, j)
linfo = (j == 0 ? first(lt) : lt[j])::Core.LineInfoNode
linfo.inlined_at == 0 && return linfo.line
@assert linfo.method === Symbol("macro expansion")
linfo = lt[linfo.inlined_at]::Core.LineInfoNode
return linfo.line
end

function getnextline(lt, j, Δline)
j == 0 && return typemax(Int)
j += 1
@@ -505,7 +502,7 @@ function getnextline(lt, j, Δline)
end
return typemax(Int)
end
end
end # @static if

# Main logic for mapping `src.code[i]` to node(s) in the SyntaxNode tree
# Success: when we map it to a unique node