Skip to content

Commit c48dcd4

Browse files
KristofferCtimholy
andauthored
Add docstring for maybe_next_call!
Co-Authored-By: timholy <[email protected]>
1 parent 99de31d commit c48dcd4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/commands.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ next_call!(@nospecialize(recurse), frame::Frame, istoplevel::Bool=false) =
9797
next_until!(is_call_or_return, recurse, frame, istoplevel)
9898
next_call!(frame::Frame, istoplevel::Bool=false) = next_call!(finish_and_return!, frame, istoplevel)
9999

100+
"""
101+
maybe_next_call!(predicate, frame, istoplevel=false)
102+
103+
Return the current statement of `frame` if it is a `:return` or `:call` expression.
104+
Otherwise, step through the statements of `frame` until the next `:return` or `:call` expression.
105+
"""
100106
function maybe_next_call!(@nospecialize(recurse), frame::Frame, istoplevel::Bool=false)
101107
pc = frame.pc
102108
is_call_or_return(pc_expr(frame, pc)) && return pc

0 commit comments

Comments
 (0)