ex = :(begin
p1, (X,Y,Z) --> 0
hill(X,p2,100.,-4), 0 --> Y
hill(Y,p3,100.,-4), 0 --> Z
hill(Z,p4,100.,-4), 0 --> X
hill(X,p5,100.,6), 0 --> R
hill(Y,p6,100.,4)*0.002, R --> 0
p7, 0 --> S
R*p8, S --> SP
p9, SP + SP --> SP2
p10, SP2 --> 0
end)
julia> ex.args
20-element Array{Any,1}:
:(#= REPL[5]:2 =#)
:((p1, $(Expr(:-->, :((X, Y, Z)), 0))))
:(#= REPL[5]:3 =#)
:((hill(X, p2, 100.0, -4), $(Expr(:-->, 0, :Y))))
:(#= REPL[5]:4 =#)
:((hill(Y, p3, 100.0, -4), $(Expr(:-->, 0, :Z))))
:(#= REPL[5]:5 =#)
:((hill(Z, p4, 100.0, -4), $(Expr(:-->, 0, :X))))
:(#= REPL[5]:6 =#)
⋮
:((hill(Y, p6, 100.0, 4) * 0.002, $(Expr(:-->, :R, 0))))
:(#= REPL[5]:8 =#)
:((p7, $(Expr(:-->, 0, :S))))
:(#= REPL[5]:9 =#)
:((R * p8, $(Expr(:-->, :S, :SP))))
:(#= REPL[5]:10 =#)
:((p9, $(Expr(:-->, :(SP + SP), :SP2))))
:(#= REPL[5]:11 =#)
:((p10, $(Expr(:-->, :SP2, 0))))
julia> ex.args[2]
:((p1, $(Expr(:-->, :((X, Y, Z)), 0))))
julia> ex.args[1]
:(#= REPL[5]:2 =#)
julia> typeof(ex.args[1])
LineNumberNode
In v0.6 I used to for a in ex.args
but now that gives these extra LineNumberNodes in there. Is there a canonical way to remove them or skip them when iterating? Are they always the odd values?