import org.simantics.scl.compiler.environment.LocalEnvironment;
import org.simantics.scl.compiler.environment.specification.EnvironmentSpecification;
import org.simantics.scl.compiler.errors.CompilationError;
+import org.simantics.scl.compiler.errors.ErrorSeverity;
import org.simantics.scl.compiler.errors.Locations;
import org.simantics.scl.compiler.internal.codegen.utils.NameMangling;
import org.simantics.scl.compiler.internal.parsing.exceptions.SCLSyntaxErrorException;
defaultHandler.printError(failure.toString());
if(failure.reason instanceof CompilationError[])
for(CompilationError error : (CompilationError[])failure.reason) {
- defaultHandler.printError(" " + error.description);
+ if(error.severity != ErrorSeverity.WARNING)
+ defaultHandler.printError(" " + error.description);
}
}
for(CommandSessionImportEntry entry : importEntries)
formatException(handler, e);
}
}
-
+
public static CompilationError[] validate(ModuleRepository moduleRepository,StringReader commandReader) {
CommandSession session = new CommandSession(moduleRepository, null);
return session.validate(commandReader);