]> gerrit.simantics Code Review - simantics/platform.git/blob
52152b1372b91cdffca7c7dc3fa036ac318b8a2d
[simantics/platform.git] /
1 package org.simantics.scl.compiler.elaboration.expressions.block;
2
3 import org.simantics.scl.compiler.elaboration.chr.CHRRuleset;
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 import org.simantics.scl.compiler.internal.codegen.references.IVal;
9 import org.simantics.scl.compiler.internal.codegen.references.Val;
10 import org.simantics.scl.compiler.internal.codegen.references.ValRef;
11 import org.simantics.scl.compiler.internal.codegen.ssa.SSAFunction;
12 import org.simantics.scl.compiler.internal.codegen.ssa.binders.ValRefBinder;
13 import org.simantics.scl.compiler.internal.parsing.Token;
14 import org.simantics.scl.compiler.types.Type;
15
16 public class IncludeStatement extends Statement implements ValRefBinder {
17     public Token name;
18     public Expression value;
19     
20     public CHRRuleset ruleset;
21     public IVal storeVar; 
22     
23     public IncludeStatement(Token name, Expression value) {
24         this.name = name;
25         this.value = value;
26     }
27     
28     @Override
29     public void setLocationDeep(long loc) {
30         if(location == Locations.NO_LOCATION) {
31             location = loc;
32             value.setLocationDeep(loc);
33         }
34     }
35     
36     @Override
37     public StatementGroup getStatementGroup() {
38         return StatementGroup.CHR;
39     }
40
41     @Override
42     public Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in) {
43         throw new UnsupportedOperationException();
44     }
45
46     @Override
47     public void resolvePattern(TranslationContext context) {
48         throw new UnsupportedOperationException();
49     }
50
51     @Override
52     public boolean mayBeRecursive() {
53         return true;
54     }
55
56     @Override
57     public void accept(StatementVisitor visitor) {
58         visitor.visit(this);
59     }
60
61     @Override
62     public SSAFunction getParentFunction() {
63         // TODO Auto-generated method stub
64         return null;
65     }
66
67     @Override
68     public void replaceByApply(ValRef valRef, Val function, Type[] typeParameters, Val[] parameters2) {
69          throw new UnsupportedOperationException();
70     }
71
72 }