]> gerrit.simantics Code Review - simantics/platform.git/blob
0c41b513a6c502a13a4eb62d631c8f46a544fa6d
[simantics/platform.git] /
1 package org.simantics.scl.compiler.elaboration.expressions.block;
2
3 import org.simantics.scl.compiler.elaboration.chr.ast.CHRAstQuery;
4 import org.simantics.scl.compiler.elaboration.contexts.EnvironmentalContext;
5 import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;
6 import org.simantics.scl.compiler.elaboration.expressions.Expression;
7 import org.simantics.scl.compiler.errors.Locations;
8
9 public class CHRStatement extends Statement {
10
11     public CHRAstQuery head;
12     public CHRAstQuery body;
13
14     public CHRStatement(CHRAstQuery head, CHRAstQuery body) {
15         this.head = head;
16         this.body = body;
17     }
18
19     @Override
20     public Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in) {
21         throw new UnsupportedOperationException();
22     }
23
24     @Override
25     public void setLocationDeep(long loc) {
26         if(location == Locations.NO_LOCATION)
27             location = loc;
28     }
29
30     @Override
31     public void resolvePattern(TranslationContext context) {
32         throw new UnsupportedOperationException();
33     }
34
35     @Override
36     public boolean mayBeRecursive() {
37         return true;
38     }
39
40     @Override
41     public void accept(StatementVisitor visitor) {
42         visitor.visit(this);
43     }
44     
45     @Override
46     public StatementGroup getStatementGroup() {
47         return StatementGroup.CHR;
48     }
49
50 }