]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EStringLiteral.java
Property following functions value and possibleValue to ontology modules
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / EStringLiteral.java
index fa85d8bfe888a0cb32e1dd4f3a8139fc0ab5606f..ff830720c487ec68dbbb427c7c8d16464f7c9c91 100644 (file)
@@ -8,8 +8,8 @@ import org.simantics.scl.compiler.errors.Locations;
 
 public class EStringLiteral extends ASTExpression {
     
-    String[] strings;
-    Expression[] expressions;
+    public String[] strings;
+    public Expression[] expressions;
    
     public EStringLiteral(String[] strings, Expression[] expressions) {
         this.strings = strings;
@@ -22,7 +22,9 @@ public class EStringLiteral extends ASTExpression {
         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);
+        EApply result = new EApply(new ELiteral(new StringInterpolation(strings)), components);
+        result.setLocationDeep(location);
+        return result.resolve(context);
     }
 
     @Override
@@ -47,8 +49,13 @@ public class EStringLiteral extends ASTExpression {
             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);
+        EApply result = new EApply(new ELiteral(new StringInterpolation(strings)), expressions);
+        result.setLocationDeep(location);
+        return result;
     }
 
-
+    @Override
+    public void accept(ExpressionVisitor visitor) {
+        visitor.visit(this);
+    }
 }