com.github.leeonky.dal.ast.node.GroupExpression Maven / Gradle / Ivy
package com.github.leeonky.dal.ast.node;
import com.github.leeonky.dal.ast.opt.DALOperator;
import com.github.leeonky.dal.compiler.DALProcedure;
import com.github.leeonky.dal.runtime.Data;
import com.github.leeonky.dal.runtime.RuntimeContextBuilder.DALRuntimeContext;
import com.github.leeonky.interpreter.InterpreterException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static java.util.stream.Collectors.toList;
public class GroupExpression extends DALNode {
private final List group = new ArrayList<>();
final List expressions = new ArrayList<>();
private final String inspect;
public GroupExpression(List group) {
this.group.addAll(group);
expressions.addAll(group);
inspect = this.group.stream().map(DALNode::inspect).collect(Collectors.joining(", ", "<<", ">>"));
}
public GroupExpression(List group, List expressions, String inspect) {
this.group.addAll(group);
this.expressions.addAll(expressions);
this.inspect = inspect;
}
@Override
public Object evaluate(DALRuntimeContext context) {
return new ArrayList
© 2015 - 2025 Weber Informatics LLC | Privacy Policy