public TapeElement Visit(TermPower power) { return(Compile(power, () => { var baseElement = power.Base.Accept(this); var expElement = power.Exponent.Accept(this); var element = new Compiled.TermPower { Inputs = MakeInputEdges(() => { edges.Add(new InputEdge { Element = baseElement }); edges.Add(new InputEdge { Element = expElement }); }), }; return element; })); }
public int Visit(TermPower power) { return(Compile(power, () => { var baseIndex = power.Base.Accept(this); var expIndex = power.Exponent.Accept(this); var element = new Compiled.TermPower { Base = baseIndex, Exponent = expIndex, Inputs = new Compiled.InputEdge[] { new Compiled.InputEdge { Index = baseIndex }, new Compiled.InputEdge { Index = expIndex }, }, }; return element; })); }