]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/types/ast/TEffectAst.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / types / ast / TEffectAst.java
diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/types/ast/TEffectAst.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/types/ast/TEffectAst.java
new file mode 100644 (file)
index 0000000..f7cb00c
--- /dev/null
@@ -0,0 +1,34 @@
+package org.simantics.scl.compiler.internal.types.ast;
+
+import org.simantics.scl.compiler.internal.types.TypeElaborationContext;
+import org.simantics.scl.compiler.types.Type;
+
+
+
+public class TEffectAst extends TypeAst {
+    public final TypeAst effect;
+    public final TypeAst type;
+    
+    public TEffectAst(TypeAst effect, TypeAst type) {
+        this.effect = effect;
+        this.type = type;
+    }
+
+    @Override
+    public void toString(StringBuilder b) {
+        b.append('<');
+        effect.toString(b);
+        b.append("> ");
+        b.append(type);
+    }
+
+    @Override
+    public Type toType(TypeElaborationContext context) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public int getPrecedence() {
+        return 0;
+    }
+}