Skip to content

Commit e71c60d

Browse files
committed
work with release CSTParser
1 parent a0c810e commit e71c60d

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/MacroTools.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ include("examples/destruct.jl")
1616
include("examples/threading.jl")
1717
include("examples/forward.jl")
1818

19-
include("patch/diff.jl")
20-
include("patch/cst.jl")
19+
using CSTParser
20+
21+
if isdefined(CSTParser, :Location)
22+
include("patch/diff.jl")
23+
include("patch/cst.jl")
24+
end
2125

2226
const animals = Symbol[]
2327
const animals_file = joinpath(@__DIR__, "..", "animals.txt")

test/runtests.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ using Compat, Compat.Test
66
include("match.jl")
77
include("split.jl")
88
include("destruct.jl")
9-
include("patch.jl")
9+
10+
if isdefined(MacroTools, :sourcewalk)
11+
include("patch.jl")
12+
end
1013

1114
end

0 commit comments

Comments
 (0)