io.github.vmzakharov.ecdataframe.dsl.AbstractScript Maven / Gradle / Ivy
package io.github.vmzakharov.ecdataframe.dsl;
import io.github.vmzakharov.ecdataframe.dsl.value.Value;
import io.github.vmzakharov.ecdataframe.dsl.visitor.InMemoryEvaluationVisitor;
import org.eclipse.collections.api.list.ListIterable;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.impl.factory.Lists;
abstract public class AbstractScript
implements Script
{
private final MutableList expressions = Lists.mutable.of();
@Override
public Expression addStatement(Expression anExpression)
{
this.expressions.add(anExpression);
return anExpression;
}
public Value evaluate()
{
return this.evaluate(new InMemoryEvaluationVisitor());
}
@Override
public ListIterable getExpressions()
{
return this.expressions;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy