Skip to content

Commit eb2fdb2

Browse files
authored
Fix separators (#164)
1 parent e367cd5 commit eb2fdb2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/ast.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,10 @@ function flatten!(flatAST::FlatAST, ex::Expr, var = [])
170170
end
171171

172172
function flatten!(flatAST::FlatAST, ex::Operation, var)
173-
if typeof(ex.op) == Variable
173+
# top = process_operation!(flatAST, ex, var)
174+
# set_top!(flatAST, top)
175+
176+
if ex.op isa Variable
174177
return flatten!(flatAST, ex.op, var)
175178
else
176179
top = process_operation!(flatAST, ex, var)
@@ -374,6 +377,12 @@ end
374377

375378
function process_operation!(flatAST::FlatAST, ex, var, new_var=nothing)
376379

380+
# println("\n\n--")
381+
# @show flatAST
382+
# @show ex
383+
# @show var
384+
# @show new_var
385+
377386
op = ex.op
378387

379388
if op in (+, *) && length(ex.args) > 2

0 commit comments

Comments
 (0)