2009-04-09 05:50:38 -04:00
|
|
|
! Copyright (C) 2009 Slava Pestov.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
|
|
|
USING: assocs compiler.errors debugger io kernel sequences
|
|
|
|
source-files.errors ;
|
|
|
|
IN: tools.errors
|
|
|
|
|
|
|
|
#! Tools for source-files.errors. Used by tools.tests and others
|
|
|
|
#! for error reporting
|
|
|
|
|
|
|
|
: errors. ( errors -- )
|
|
|
|
group-by-source-file sort-errors
|
|
|
|
[
|
|
|
|
[ nl "==== " write print nl ]
|
|
|
|
[ [ nl ] [ error. ] interleave ]
|
|
|
|
bi*
|
|
|
|
] assoc-each ;
|
|
|
|
|
|
|
|
: compiler-errors. ( type -- )
|
2009-04-09 09:17:41 -04:00
|
|
|
errors-of-type values errors. ;
|
2009-04-09 05:50:38 -04:00
|
|
|
|
2009-04-10 04:52:12 -04:00
|
|
|
: :errors ( -- ) +compiler-error+ compiler-errors. ;
|
2009-04-09 05:50:38 -04:00
|
|
|
|
2009-04-10 04:52:12 -04:00
|
|
|
: :warnings ( -- ) +compiler-warning+ compiler-errors. ;
|
2009-04-09 05:50:38 -04:00
|
|
|
|
2009-04-10 04:52:12 -04:00
|
|
|
: :linkage ( -- ) +linkage-error+ compiler-errors. ;
|