Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ Cargo.lock

# vim swap files
*.swp

# Intellij IDEA files
.idea
15 changes: 13 additions & 2 deletions src/evaler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,12 @@ impl Evaler for StdFunc {
EUnsafeVar{name, ..} => { dst.insert(name.clone()); }

EVar(s) => { dst.insert(s.clone()); }
EFunc{name, ..} => { dst.insert(name.clone()); }
EFunc{name, args} => {
dst.insert(name.clone());
for arg in args {
get_expr!(slab.ps,arg)._var_names(slab,dst);
}
}

EFuncInt(xi) | EFuncCeil(xi) | EFuncFloor(xi) | EFuncAbs(xi) | EFuncSign(xi) | EFuncSin(xi) | EFuncCos(xi) | EFuncTan(xi) | EFuncASin(xi) | EFuncACos(xi) | EFuncATan(xi) | EFuncSinH(xi) | EFuncCosH(xi) | EFuncTanH(xi) | EFuncASinH(xi) | EFuncACosH(xi) | EFuncATanH(xi) => get_expr!(slab.ps,xi)._var_names(slab,dst),

Expand Down Expand Up @@ -542,7 +547,13 @@ impl Evaler for Instruction {
IUnsafeVar{name, ..} => { dst.insert(name.clone()); }

IVar(s) => { dst.insert(s.clone()); }
IFunc{name, ..} => { dst.insert(name.clone()); }
IFunc{name, args} => {
dst.insert(name.clone());
for ic in args {
let iconst : Instruction;
ic_to_instr!(slab.cs,iconst,ic)._var_names(slab,dst);
}
}

IConst(_) => (),

Expand Down