Skip to content

Commit

Permalink
allow accessing the JuliaInterpreter frame with a sentinel
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Mar 29, 2019
1 parent e935b83 commit 5328ab7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ function eval_code(frame::Frame, command::AbstractString)
vars = filter(v -> v.name != Symbol(""), JuliaInterpreter.locals(frame))
res = gensym()
eval_expr = Expr(:let,
Expr(:block, map(x->Expr(:(=), x...), [(v.name, maybe_quote(v.value)) for v in vars])...),
Expr(:block, map(x->Expr(:(=), x...), [(v.name, maybe_quote(v.value)) for v in vars])...,
Expr(:(=), :__FRAME__ , frame)),
Expr(:block,
Expr(:(=), res, expr),
Expr(:tuple, res, Expr(:tuple, [v.name for v in vars]...))
Expand Down
3 changes: 2 additions & 1 deletion src/watch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ function show_watch_list(io, state::DebuggerState)
for (i, expr) in enumerate(state.watch_list)
vars = filter(v -> v.name != Symbol(""), JuliaInterpreter.locals(frame))
eval_expr = Expr(:let,
Expr(:block, map(x->Expr(:(=), x...), [(v.name, maybe_quote(v.value)) for v in vars])...),
Expr(:block, map(x->Expr(:(=), x...), [(v.name, maybe_quote(v.value)) for v in vars])...,
Expr(:(=), :__FRAME__ , frame)),
expr)
errored = false
res = try
Expand Down

0 comments on commit 5328ab7

Please sign in to comment.