1 package org.simantics.scl.compiler.internal.parsing.declarations;
3 import org.simantics.scl.compiler.internal.parsing.Symbol;
4 import org.simantics.scl.compiler.internal.parsing.types.TypeAst;
7 public class ConstructorAst extends Symbol {
8 public static final ConstructorAst[] EMPTY_ARRAY = new ConstructorAst[0];
10 public final DAnnotationAst[] annotations;
11 public final String name;
12 public final TypeAst[] parameters;
13 public final String[] fieldNames; // null, if no field names
15 public ConstructorAst(DAnnotationAst[] annotations, String name,
16 TypeAst[] parameters, String[] fieldNames) {
17 this.annotations = annotations;
19 this.parameters = parameters;
20 this.fieldNames = fieldNames;
23 public void toString(StringBuilder b) {
25 for(TypeAst parameter : parameters) {
27 parameter.toString(b, 1);