Skip to content

Commit

Permalink
Remove ns command
Browse files Browse the repository at this point in the history
Since we now operate on lowered AST, we don't know which things were statements
and which weren't, so this isn't a meaningfully implementable command anymore.

Part of #2
  • Loading branch information
Keno committed Oct 21, 2017
1 parent f3c1988 commit 6ec323f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ASTInterpreter2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function DebuggerFramework.print_next_state(io::IO, state, frame::JuliaStackFram
end

const all_commands = ("q", "s", "si", "finish", "bt", "loc", "ind", "shadow",
"up", "down", "ns", "nc", "n", "se")
"up", "down", "nc", "n", "se")

function DebuggerFramework.language_specific_prompt(state, frame::JuliaStackFrame)
if haskey(state.language_modes, :julia)
Expand Down
6 changes: 2 additions & 4 deletions src/commands.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ function perform_return!(state)
end
end

function DebuggerFramework.execute_command(state, frame::JuliaStackFrame, ::Union{Val{:ns},Val{:nc},Val{:n},Val{:se}}, command)
if (pc = command == "ns" ? next_statement!(frame) :
command == "nc" ? next_call!(frame) :
function DebuggerFramework.execute_command(state, frame::JuliaStackFrame, ::Union{Val{:nc},Val{:n},Val{:se}}, command)
if (pc = command == "nc" ? next_call!(frame) :
command == "n" ? next_line!(frame, state.stack) :
#= command == "se" =# step_expr(frame)) != nothing
state.stack[1] = JuliaStackFrame(state.stack[1], pc)
Expand Down Expand Up @@ -106,7 +105,6 @@ function DebuggerFramework.execute_command(state, frane::JuliaStackFrame, ::Val{
- `f n` where `n` is an integer, will go to the `n`-th frame.\\
Advanced commands:\\
- `nc` steps to the next call\\
- `ns` steps to the next statement\\
- `se` does one expression step\\
- `si` does the same but steps into a call if a call is the next expression\\
- `sg` steps into a generated function\\
Expand Down

0 comments on commit 6ec323f

Please sign in to comment.