All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.snapscript.tree.closure.ClosureBody Maven / Gradle / Ivy

There is a newer version: 1.4.6
Show newest version
package org.snapscript.tree.closure;

import org.snapscript.core.function.Function;
import org.snapscript.core.function.FunctionBody;
import org.snapscript.core.function.Invocation;
import org.snapscript.core.function.InvocationBuilder;
import org.snapscript.core.scope.Scope;

public class ClosureBody extends FunctionBody {

   public ClosureBody(InvocationBuilder builder, InvocationBuilder other, Function function) {
      super(builder, other, function);
   }
   
   public Function create(Scope scope) throws Exception {
      Invocation invocation = new ClosureInvocation(actual, scope);
      Function closure = new ClosureFunction(function, invocation);
      
      return closure;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy