Ejemplo n.º 1
0
  public ListExpression(Execution exec, Expression[] exs, Type parentType, String name)
      throws CompilerException {

    this.exprs = exs;

    // FIXEDME: add this type to a scope!!!
    type =
        new TupleType(
            new TypeIdentifier((name == null ? "[AnonList]" : name), parentType),
            parentType); // FIXME?

    for (int i = 0; i < exs.length; i++) {

      Expression e = exs[i];
      assert e != null;

      // type.addAttribute(null, (String) null, new TypeOf(e, exec.getInterpreter())); // FIXME:
      // notnull attrKind
      type.addAttribute((String) null, new TypeOf(e, exec.getInterpreter()));
    }

    Execution.getInstance().allAnonTypes.add(type);
  }