]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/types/TVarAst.java
Replace System.err and System.out with SLF4J Logging
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / parsing / types / TVarAst.java
index 84d3e3a01d4f37fd02e6fc331ba979b40bf7aa99..cf5a7a862c45fa99a5cad9b5148a6ec586910585 100644 (file)
@@ -11,6 +11,8 @@ import org.simantics.scl.compiler.types.Type;
 import org.simantics.scl.compiler.types.Types;
 import org.simantics.scl.compiler.types.kinds.Kind;
 import org.simantics.scl.compiler.types.kinds.Kinds;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import gnu.trove.map.hash.TObjectIntHashMap;
 import gnu.trove.set.hash.TIntHashSet;
@@ -20,7 +22,8 @@ import gnu.trove.set.hash.TIntHashSet;
  * This class represents an abstract syntax tree node for a type variable.
  * The only property of a type variable is its name.
  */
-public class TVarAst extends TypeAst {    
+public class TVarAst extends TypeAst {
+    private static final Logger LOGGER = LoggerFactory.getLogger(TVarAst.class);
     public final String name;
     
     public TVarAst(String name) {
@@ -98,7 +101,7 @@ public class TVarAst extends TypeAst {
                     if(name.charAt(i) != ',') {
                         con = context.resolveTypeConstructor(name.substring(1, name.length()-1));
                         if(con == null) {
-                            System.err.println("Didn't find type constructor " + name + ".");
+                            LOGGER.warn("Didn't find type constructor " + name + ".");
                             return Types.metaVar(Kinds.STAR);
                         }
                         break block;
@@ -112,7 +115,7 @@ public class TVarAst extends TypeAst {
             else {                
                 con = context.resolveTypeConstructor(name);
                 if(con == null) {
-                    System.err.println("Didn't find type constructor " + name + ".");
+                    LOGGER.warn("Didn't find type constructor " + name + ".");
                     return Types.metaVar(Kinds.STAR);
                 }
             }
@@ -159,7 +162,7 @@ public class TVarAst extends TypeAst {
         else {
             Type con = context.resolveTypeConstructor(name);
             if(con == null) {
-                System.err.println("Didn't find effect constructor " + name + ".");
+                LOGGER.warn("Didn't find effect constructor " + name + ".");
                 return Types.metaVar(Kinds.EFFECT);
             }
             return con;