MCPcopy
hub / github.com/google/mangle / ApplySubst

Method ApplySubst

ast/ast.go:1178–1184  ·  view source on GitHub ↗

ApplySubst returns the result of applying given substitution to this atom.

(s Subst)

Source from the content-addressed store, hash-verified

1176
1177// ApplySubst returns the result of applying given substitution to this atom.
1178func (a ApplyFn) ApplySubst(s Subst) Term {
1179 newargs := make([]BaseTerm, len(a.Args))
1180 for i, t := range a.Args {
1181 newargs[i] = t.ApplySubstBase(s)
1182 }
1183 return ApplyFn{a.Function, newargs}
1184}
1185
1186// ApplySubstBase simply returns this constant, for any substitution.
1187func (a ApplyFn) ApplySubstBase(s Subst) BaseTerm {

Callers 1

ApplySubstBaseMethod · 0.95

Calls 1

ApplySubstBaseMethod · 0.65

Tested by

no test coverage detected