X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FEStringLiteral.java;h=f15e62cbf14b312e57eacd7b194a1353e90bfd55;hp=79d464b7b459a35cd3fc921b8f745f3b487bce57;hb=a8758de5bc19e5adb3f618d3038743a164f09912;hpb=12d9af17384d960b75d58c3935d2b7b46d93e87b diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EStringLiteral.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EStringLiteral.java index 79d464b7b..f15e62cbf 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EStringLiteral.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EStringLiteral.java @@ -1,6 +1,6 @@ package org.simantics.scl.compiler.elaboration.expressions; -import org.simantics.scl.compiler.common.names.Name; +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; @@ -19,7 +19,7 @@ public class EStringLiteral extends ASTExpression { @Override public Expression resolve(TranslationContext context) { Expression[] components = new Expression[expressions.length]; - SCLValue showForPrinting = context.getEnvironment().getValue(Name.create("Prelude", "showForPrinting")); + SCLValue showForPrinting = context.getEnvironment().getValue(Names.Prelude_showForPrinting); for(int i=0;i 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); + } }