Skip to content

Commit d16f5b3

Browse files
committed
fix doctest
1 parent 81ed3d9 commit d16f5b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/macros.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function find_symbols_in_ast(ex)
2424
return unique(symbols)
2525
end
2626

27+
# https://docs.julialang.org/en/v1/base/base/#Keywords
2728
RESERVED = [
2829
:baremodule, :begin, :break, :catch, :const, :continue, :do, :else,
2930
:elseif, :end, :export, :false, :finally, :for, :function, :global, :if,
@@ -51,6 +52,7 @@ end
5152
We find all "assigned symbols", as in, everything except:
5253
- anonymous functions :((x,y,z) -> x*x).args[1]
5354
- generators :((x for x in 1:10))
55+
- Reserved keywords
5456
- ... others that we should catch...?
5557
"""
5658
function find_assigned_symbols_in_ast(ex)
@@ -236,7 +238,7 @@ end
236238
c = -1
237239
reify(abc)
238240
# output
239-
-1
241+
2
240242
```
241243
"""
242244
macro noeval(ex)

0 commit comments

Comments
 (0)