]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EStringLiteral.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / EStringLiteral.java
index f15e62cbf14b312e57eacd7b194a1353e90bfd55..fa85d8bfe888a0cb32e1dd4f3a8139fc0ab5606f 100644 (file)
@@ -1,54 +1,54 @@
-package org.simantics.scl.compiler.elaboration.expressions;\r
-\r
-import org.simantics.scl.compiler.common.names.Names;\r
-import org.simantics.scl.compiler.constants.StringInterpolation;\r
-import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;\r
-import org.simantics.scl.compiler.elaboration.modules.SCLValue;\r
-import org.simantics.scl.compiler.errors.Locations;\r
-\r
-public class EStringLiteral extends ASTExpression {\r
-    \r
-    String[] strings;\r
-    Expression[] expressions;\r
-   \r
-    public EStringLiteral(String[] strings, Expression[] expressions) {\r
-        this.strings = strings;\r
-        this.expressions = expressions;\r
-    }\r
-\r
-    @Override\r
-    public Expression resolve(TranslationContext context) {\r
-        Expression[] components = new Expression[expressions.length];\r
-        SCLValue showForPrinting = context.getEnvironment().getValue(Names.Prelude_showForPrinting);\r
-        for(int i=0;i<expressions.length;++i)\r
-            components[i] = new EApply(new EConstant(showForPrinting), expressions[i]);\r
-        return new EApply(new ELiteral(new StringInterpolation(strings)), components).resolve(context);\r
-    }\r
-\r
-    @Override\r
-    public void setLocationDeep(long loc) {\r
-        if(location == Locations.NO_LOCATION) {\r
-            location = loc;\r
-            for(Expression expression : expressions)\r
-                expression.setLocationDeep(loc);\r
-        }\r
-    }\r
-    \r
-    @Override\r
-    public Expression accept(ExpressionTransformer transformer) {\r
-        return transformer.transform(this);\r
-    }\r
-    \r
-    @Override\r
-    public Expression resolveAsPattern(TranslationContext context) {\r
-        for(int i=0;i<expressions.length;++i)\r
-            expressions[i] = expressions[i].resolveAsPattern(context);\r
-        if(expressions.length > 1) {\r
-            context.getErrorLog().log(location, "String interpolation can be a pattern only if has one hole.");\r
-            return new EError();\r
-        }\r
-        return new EApply(new ELiteral(new StringInterpolation(strings)), expressions);\r
-    }\r
-\r
-\r
-}\r
+package org.simantics.scl.compiler.elaboration.expressions;
+
+import org.simantics.scl.compiler.common.names.Names;
+import org.simantics.scl.compiler.constants.StringInterpolation;
+import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;
+import org.simantics.scl.compiler.elaboration.modules.SCLValue;
+import org.simantics.scl.compiler.errors.Locations;
+
+public class EStringLiteral extends ASTExpression {
+    
+    String[] strings;
+    Expression[] expressions;
+   
+    public EStringLiteral(String[] strings, Expression[] expressions) {
+        this.strings = strings;
+        this.expressions = expressions;
+    }
+
+    @Override
+    public Expression resolve(TranslationContext context) {
+        Expression[] components = new Expression[expressions.length];
+        SCLValue showForPrinting = context.getEnvironment().getValue(Names.Prelude_showForPrinting);
+        for(int i=0;i<expressions.length;++i)
+            components[i] = new EApply(new EConstant(showForPrinting), expressions[i]);
+        return new EApply(new ELiteral(new StringInterpolation(strings)), components).resolve(context);
+    }
+
+    @Override
+    public void setLocationDeep(long loc) {
+        if(location == Locations.NO_LOCATION) {
+            location = loc;
+            for(Expression expression : expressions)
+                expression.setLocationDeep(loc);
+        }
+    }
+    
+    @Override
+    public Expression accept(ExpressionTransformer transformer) {
+        return transformer.transform(this);
+    }
+    
+    @Override
+    public Expression resolveAsPattern(TranslationContext context) {
+        for(int i=0;i<expressions.length;++i)
+            expressions[i] = expressions[i].resolveAsPattern(context);
+        if(expressions.length > 1) {
+            context.getErrorLog().log(location, "String interpolation can be a pattern only if has one hole.");
+            return new EError();
+        }
+        return new EApply(new ELiteral(new StringInterpolation(strings)), expressions);
+    }
+
+
+}