org.snapscript.tree.define.StaticFieldFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap Show documentation
Show all versions of snap Show documentation
Dynamic scripting for the JVM
package org.snapscript.tree.define;
import org.snapscript.core.Evaluation;
import org.snapscript.core.Result;
import org.snapscript.core.ResultType;
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.evaluate(scope, null);
return ResultType.getNormal();
}
}