-package org.simantics.scl.compiler.environment;\r
-\r
-import gnu.trove.procedure.TObjectProcedure;\r
-\r
-import org.simantics.scl.compiler.elaboration.expressions.Expression;\r
-import org.simantics.scl.compiler.types.Type;\r
-import org.simantics.scl.compiler.types.util.ProcedureType;\r
-\r
-/**\r
- * Provides local variable names for expressions\r
- * that do not need to defined in any module.\r
- * \r
- * @author Hannu Niemistö\r
- */\r
-public interface LocalEnvironment {\r
- /**\r
- * Resolves the variable name to an expression evaluating it.\r
- * Returns null if the local environment does not provide the variable.\r
- */\r
- Expression resolve(Environment environment, String localName);\r
- \r
- /**\r
- * Lists all names of variables provided by this environment.\r
- * The method is used only for error reporting, so its efficiently\r
- * or completion is not absolutely necessary.\r
- */\r
- void forNames(TObjectProcedure<String> proc);\r
- \r
- /**\r
- * Modifies the expression before type checking.\r
- */\r
- Expression preDecorateExpression(Expression expression);\r
- \r
- /**\r
- * Modifies the expression after type checking.\r
- */\r
- Expression postDecorateExpression(Expression expression);\r
- \r
- /**\r
- * Modifies expected type and effect before type checking.\r
- */\r
- ProcedureType decorateExpectedType(Type expectedType, Type expectedEffect);\r
-}\r
+package org.simantics.scl.compiler.environment;
+
+import org.simantics.scl.compiler.elaboration.expressions.Expression;
+import org.simantics.scl.compiler.types.Type;
+import org.simantics.scl.compiler.types.util.ProcedureType;
+
+import gnu.trove.procedure.TObjectProcedure;
+
+/**
+ * Provides local variable names for expressions
+ * that do not need to defined in any module.
+ *
+ * @author Hannu Niemistö
+ */
+public interface LocalEnvironment {
+ /**
+ * Resolves the variable name to an expression evaluating it.
+ * Returns null if the local environment does not provide the variable.
+ */
+ Expression resolve(Environment environment, String localName);
+
+ /**
+ * Lists all names of variables provided by this environment.
+ * The method is used only for error reporting, so its efficiently
+ * or completion is not absolutely necessary.
+ */
+ void forNames(TObjectProcedure<String> proc);
+
+ /**
+ * Modifies the expression before type checking.
+ */
+ Expression preDecorateExpression(Expression expression);
+
+ /**
+ * Modifies the expression after type checking.
+ */
+ Expression postDecorateExpression(Expression expression);
+
+ /**
+ * Modifies expected type and effect before type checking.
+ */
+ ProcedureType decorateExpectedType(Type expectedType, Type expectedEffect);
+}