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

org.snapscript.tree.define.StaticFieldFactory Maven / Gradle / Ivy

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

import org.snapscript.core.Evaluation;
import org.snapscript.core.Result;
import org.snapscript.core.Scope;
import org.snapscript.core.Type;

public class StaticFieldFactory extends StaticFactory {
   
   private final Evaluation evaluation;
   
   public StaticFieldFactory(Evaluation evaluation){
      this.evaluation = evaluation;
   }

   @Override
   protected Result compile(Type type) throws Exception {
      Scope scope = type.getScope();
      
      evaluation.compile(scope);
      evaluation.evaluate(scope, null);
      
      return Result.getNormal();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy