import java.util.ArrayList;\r
\r
import org.simantics.scl.compiler.common.exceptions.InternalCompilerError;\r
-import org.simantics.scl.compiler.common.names.Name;\r
+import org.simantics.scl.compiler.common.names.Names;\r
import org.simantics.scl.compiler.common.precedence.Associativity;\r
import org.simantics.scl.compiler.common.precedence.Precedence;\r
import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;\r
public Expression resolve(TranslationContext context) {\r
return parseOperators(context).resolve(context);\r
}\r
-\r
- private static final Name NEG = Name.create("Prelude", "neg");\r
\r
public Expression parseOperators(TranslationContext context) {\r
ArrayList<Expression> output = new ArrayList<Expression>();\r
}\r
if(negation != null && ops.isEmpty()) {\r
if(opPrec.level <= NEGATION_LEVEL) { \r
- SCLValue neg = context.getEnvironment().getValue(NEG);\r
+ SCLValue neg = context.getEnvironment().getValue(Names.Prelude_neg);\r
if(neg == null) {\r
context.getErrorLog().log(location, \r
"Couldn't resolve variable neg.");\r
output.add(binary(l, oldOp, opAsts.remove(opAsts.size()-1), r));\r
}\r
if(negation != null) {\r
- SCLValue neg = context.getEnvironment().getValue(NEG);\r
+ SCLValue neg = context.getEnvironment().getValue(Names.Prelude_neg);\r
if(neg == null) {\r
context.getErrorLog().log(location, \r
"Couldn't resolve variable neg.");\r