correctly output preprocessor errors
[org.ibex.tool.git] / src / java / org / ibex / tool / Compiler.java
index b70859f..6d46890 100644 (file)
@@ -276,7 +276,16 @@ public class Compiler {
                     }
 
                     if (err.size() > 0) {
-                        System.out.println("Preprocessor Errors, "+err); // FIXME
+                        for (int i=0; i < err.size(); i++) {
+                            Preprocessor.Warning warn = (Preprocessor.Warning)err.get(i);
+                            out.print(getFileName());
+                            out.print(':');
+                            out.print(warn.getLine());
+                            out.print(':');
+                            out.print(warn instanceof Preprocessor.Error ?
+                                      " error: " : " warning: ");
+                            out.println(warn.getMessage());
+                        }
                         return null;
                     }