1 package org.simantics.scl.compiler.elaboration.expressions.block;
3 import org.simantics.scl.compiler.elaboration.contexts.EnvironmentalContext;
4 import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;
5 import org.simantics.scl.compiler.elaboration.expressions.Expression;
6 import org.simantics.scl.compiler.errors.Locations;
7 import org.simantics.scl.compiler.internal.parsing.Token;
8 import org.simantics.scl.compiler.internal.parsing.declarations.DAnnotationAst;
9 import org.simantics.scl.compiler.internal.parsing.types.TypeAst;
11 public class ConstraintStatement extends Statement {
14 public TypeAst[] parameterTypes;
15 public String[] fieldNames;
16 public DAnnotationAst[] annotations;
18 public ConstraintStatement(Token name, TypeAst[] parameterTypes, String[] fieldNames, DAnnotationAst[] annotations) {
20 this.parameterTypes = parameterTypes;
21 this.fieldNames = fieldNames;
22 this.annotations = annotations;
26 public void setLocationDeep(long loc) {
27 if(location == Locations.NO_LOCATION) {
29 for(TypeAst parameterType : parameterTypes)
30 if(parameterType.location == Locations.NO_LOCATION)
31 parameterType.location = location;
36 public Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in) {
37 throw new UnsupportedOperationException();
41 public void resolvePattern(TranslationContext context) {
42 throw new UnsupportedOperationException();
46 public boolean mayBeRecursive() {
47 throw new UnsupportedOperationException();
51 public void accept(StatementVisitor visitor) {
52 throw new UnsupportedOperationException();
56 public StatementGroup getStatementGroup() {
57 return StatementGroup.CHR;