factor/basis/tools/errors/errors.factor

26 lines
691 B
Factor
Raw Normal View History

! 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. ;
: :errors ( -- ) +compiler-error+ compiler-errors. ;
: :warnings ( -- ) +compiler-warning+ compiler-errors. ;
: :linkage ( -- ) +linkage-error+ compiler-errors. ;