File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -332,12 +332,16 @@ function scopeof(expr::CSTParser.EXPR)
332
332
return :call
333
333
end
334
334
335
+ if expr. typ == CSTParser. TupleH && expr. parent ≠ nothing && scopeof (expr. parent) == nothing
336
+ return :tupleh
337
+ end
338
+
335
339
if expr. typ == CSTParser. MacroCall
336
340
return :macro
337
341
end
338
342
339
- if expr. typ == CSTParser. TupleH && expr . parent ≠ nothing && scopeof (expr . parent) == nothing
340
- return :tupleh
343
+ if expr. typ == CSTParser. Quote
344
+ return :quote
341
345
end
342
346
end
343
347
return nothing
Original file line number Diff line number Diff line change 286
286
end
287
287
end
288
288
289
+ # items inside quote blocks don't leak
290
+ let str = """
291
+ ex = :(func() = nothing)
292
+ q = quote
293
+ @macrocall something
294
+ val = nothing
295
+ end
296
+ """
297
+ let names = Set (map (d -> d[:name ], outline (str)))
298
+ @test length (names) === 2
299
+ @test names == Set ((" ex" , " q" ))
300
+ end
301
+ end
302
+
289
303
# should stringify method signatures correctly
290
304
let str = """
291
305
withstrings(single = \" 1\" , triple = \"\"\" 3\"\"\" ) = single * triple
You can’t perform that action at this time.
0 commit comments