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

io.github.vmzakharov.ecdataframe.dsl.AnonymousScript Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package io.github.vmzakharov.ecdataframe.dsl;

import io.github.vmzakharov.ecdataframe.dsl.value.Value;
import io.github.vmzakharov.ecdataframe.dsl.visitor.ExpressionEvaluationVisitor;
import io.github.vmzakharov.ecdataframe.dsl.visitor.ExpressionVisitor;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.impl.factory.Maps;

public class AnonymousScript
extends AbstractScript
{
    private final MutableMap functions = Maps.mutable.of();

    public AnonymousScript()
    {
    }

    @Override
    public Value evaluate(ExpressionEvaluationVisitor visitor)
    {
        return visitor.visitAnonymousScriptExpr(this);
    }

    @Override
    public void accept(ExpressionVisitor visitor)
    {
        visitor.visitAnonymousScriptExpr(this);
    }

    public void addFunctionScript(FunctionScript functionScript)
    {
        this.functions.put(functionScript.getNormalizedName(), functionScript);
    }

    public MutableMap getFunctions()
    {
        return this.functions;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy