1 package org.simantics.scl.compiler.internal.interpreted;
3 import java.util.Arrays;
5 public class IListLiteral implements IExpression {
7 private final IExpression[] componentExpressions;
9 public IListLiteral(IExpression[] componentExpressions) {
10 this.componentExpressions = componentExpressions;
14 public Object execute(Object[] variableBindings) {
15 Object[] components = new Object[componentExpressions.length];
16 for(int i=0;i<componentExpressions.length;++i)
17 components[i] = componentExpressions[i].execute(variableBindings);
18 return Arrays.asList(components);
22 public String toString() {
23 StringBuilder b = new StringBuilder();
25 for(int i=0;i<componentExpressions.length;++i) {
28 b.append(componentExpressions[i]);