com.github.leeonky.dal.ast.node.ExecutableNode Maven / Gradle / Ivy
package com.github.leeonky.dal.ast.node;
import com.github.leeonky.dal.runtime.Data;
import com.github.leeonky.dal.runtime.RuntimeContextBuilder;
import com.github.leeonky.dal.runtime.RuntimeException;
import com.github.leeonky.interpreter.Node;
public interface ExecutableNode extends Node {
Data getValue(Data data, RuntimeContextBuilder.DALRuntimeContext context);
default Data getValue(DALNode left, RuntimeContextBuilder.DALRuntimeContext context) {
Data data = left.evaluateData(context);
if (data.isNull())
throw new RuntimeException("Instance is null", getOperandPosition());
return getValue(data, context);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy