Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Dec 14, 2019
1 parent e587685 commit 8fd2afd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
SourceWalk = "2987fe4f-acca-4bd1-87ee-98b3d562f1a1"
Traceur = "37b6cedf-1f77-55f8-9503-c64b63398394"
TreeViews = "a2a6695c-b41b-5b7d-aed9-dbfdeacea5d7"
WebIO = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29"
Expand All @@ -45,7 +46,7 @@ JuliaInterpreter = "^0.7.0"
Juno = "^0.7.0"
LNR = "^0.2.0"
Lazy = "^0.13.2, ^0.14"
MacroTools = "^0.5"
MacroTools = "^0.5.1"
Media = "^0.5"
OrderedCollections = "^1.1"
Requires = "^0.5"
Expand Down
1 change: 0 additions & 1 deletion src/debugger/stepper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ using JuliaInterpreter: pc_expr, extract_args, debug_command, root, caller,
import JuliaInterpreter
import ..Atom: fullpath, handle, @msg, Inline, display_error
import Juno: Row
using MacroTools

mutable struct DebuggerState
frame::Union{Nothing, Frame}
Expand Down
6 changes: 4 additions & 2 deletions src/refactor.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using SourceWalk: textwalk, sourcewalk

handle("renamerefactor") do data
@destruct [
oldWord,
Expand Down Expand Up @@ -91,9 +93,9 @@ function localrenamerefactor(oldword, newword, column, row, startrow, context, e
scope === nothing && return ""

currentcontext = scope.bindstr
newcontext = MacroTools.textwalk(currentcontext) do sym
oldsym = Symbol(oldword)
newsym = Symbol(newword)
newcontext = textwalk(currentcontext) do sym
sym === oldsym ? newsym : sym
end

Expand Down Expand Up @@ -159,7 +161,7 @@ function _globalrenamerefactor(oldword, newword, mod, expr, files)
for (i, file) enumerate(files)
@logmsg -1 "Refactoring: $file ($i / $total)" progress=i/total _id=id

MacroTools.sourcewalk(file) do ex
sourcewalk(file) do ex
if ex === oldsym
push!(modifiedfiles, fullpath(file))
newsym
Expand Down

0 comments on commit 8fd2afd

Please sign in to comment.