]> gerrit.simantics Code Review - simantics/platform.git/blob
608f405b826ed11848b156b6e229ee4250998544
[simantics/platform.git] /
1 package org.simantics.scl.compiler.internal.parsing.declarations;
2
3 import java.util.List;
4
5 import org.simantics.scl.compiler.elaboration.expressions.Expression;
6 import org.simantics.scl.compiler.internal.parsing.Token;
7
8 public class DAnnotationAst extends DeclarationAst {
9     public static final DAnnotationAst[] EMPTY_ARRAY = new DAnnotationAst[0];
10     
11     public final Token id;
12     public final Expression[] parameters;
13     
14     public DAnnotationAst(Token id, List<Expression> parameters) {
15         this.id = id;
16         this.parameters = parameters.toArray(new Expression[parameters.size()]);
17     }
18
19     @Override
20     public void toString(int indentation, StringBuilder b) {
21         for(int i=0;i<indentation;++i)
22             b.append("    ");
23         b.append(id.text);        
24     }
25 }