]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/plan/MatchOp.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / chr / plan / MatchOp.java
index aac4a94efaf154d6f36946e59a804c555bad62dd..97fa2e7403191412bddff37e4214c2ccedfef9e4 100644 (file)
@@ -1,46 +1,46 @@
-package org.simantics.scl.compiler.elaboration.chr.plan;\r
-\r
-import java.util.ArrayList;\r
-\r
-import org.simantics.scl.compiler.compilation.CompilationContext;\r
-import org.simantics.scl.compiler.elaboration.expressions.Expression;\r
-import org.simantics.scl.compiler.internal.codegen.references.IVal;\r
-import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter;\r
-import org.simantics.scl.compiler.internal.elaboration.matching2.PatternMatchingCompiler2;\r
-import org.simantics.scl.compiler.internal.elaboration.matching2.Row2;\r
-\r
-public class MatchOp extends PlanOp {\r
-    public Expression scrutinee;\r
-    public Expression pattern;\r
-    \r
-    public MatchOp(long location, Expression scrutinee, Expression pattern) {\r
-        super(location);\r
-        this.scrutinee = scrutinee;\r
-        this.pattern = pattern;\r
-    }\r
-    \r
-    @Override\r
-    public void toString(StringBuilder b) {\r
-        b.append("MATCH ").append(pattern).append(" = ").append(scrutinee);\r
-    }\r
-\r
-    @Override\r
-    public void generateCode(CompilationContext context, PlanContext planContext, CodeWriter w) {\r
-        CodeWriter body = w.createBlock();\r
-        CodeWriter end = w.createBlock();\r
-        \r
-        IVal[] scrutineeVals = new IVal[1];\r
-        scrutineeVals[0] = scrutinee.toVal(context.environment, w);\r
-\r
-        ArrayList<Row2> rows = new ArrayList<Row2>(1);\r
-        rows.add(new Row2(new Expression[] {pattern}, body.getContinuation()));\r
-\r
-        PatternMatchingCompiler2.split(w, context.environment, scrutineeVals, end.getContinuation(), rows);\r
-        \r
-        planContext.nextOp(body);\r
-        if(body.isUnfinished())\r
-            body.jump(end.getContinuation());\r
-        \r
-        w.continueAs(end);\r
-    }\r
-}\r
+package org.simantics.scl.compiler.elaboration.chr.plan;
+
+import java.util.ArrayList;
+
+import org.simantics.scl.compiler.compilation.CompilationContext;
+import org.simantics.scl.compiler.elaboration.expressions.Expression;
+import org.simantics.scl.compiler.internal.codegen.references.IVal;
+import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter;
+import org.simantics.scl.compiler.internal.elaboration.matching2.PatternMatchingCompiler2;
+import org.simantics.scl.compiler.internal.elaboration.matching2.Row2;
+
+public class MatchOp extends PlanOp {
+    public Expression scrutinee;
+    public Expression pattern;
+    
+    public MatchOp(long location, Expression scrutinee, Expression pattern) {
+        super(location);
+        this.scrutinee = scrutinee;
+        this.pattern = pattern;
+    }
+    
+    @Override
+    public void toString(StringBuilder b) {
+        b.append("MATCH ").append(pattern).append(" = ").append(scrutinee);
+    }
+
+    @Override
+    public void generateCode(CompilationContext context, PlanContext planContext, CodeWriter w) {
+        CodeWriter body = w.createBlock();
+        CodeWriter end = w.createBlock();
+        
+        IVal[] scrutineeVals = new IVal[1];
+        scrutineeVals[0] = scrutinee.toVal(context.environment, w);
+
+        ArrayList<Row2> rows = new ArrayList<Row2>(1);
+        rows.add(new Row2(new Expression[] {pattern}, body.getContinuation()));
+
+        PatternMatchingCompiler2.split(w, context.environment, scrutineeVals, end.getContinuation(), rows);
+        
+        planContext.nextOp(body);
+        if(body.isUnfinished())
+            body.jump(end.getContinuation());
+        
+        w.continueAs(end);
+    }
+}