parent
9ae3b50a53
commit
5a66b3b329
|
@ -0,0 +1,20 @@
|
||||||
|
USING: accessors debugger io kernel make math.parser
|
||||||
|
prettyprint source-files.errors summary ;
|
||||||
|
IN: source-files.errors.debugger
|
||||||
|
|
||||||
|
CONSTANT: +listener-input+ "<Listener input>"
|
||||||
|
|
||||||
|
: error-location ( error -- string )
|
||||||
|
[
|
||||||
|
[ file>> [ % ] [ +listener-input+ % ] if* ]
|
||||||
|
[ line#>> [ ": " % # ] when* ] bi
|
||||||
|
] "" make ;
|
||||||
|
|
||||||
|
M: source-file-error summary error>> summary ;
|
||||||
|
|
||||||
|
M: source-file-error error.
|
||||||
|
[ error-location print nl ]
|
||||||
|
[ asset>> [ "Asset: " write short. nl ] when* ]
|
||||||
|
[ error>> error. ]
|
||||||
|
tri ;
|
||||||
|
|
|
@ -2,28 +2,12 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: assocs debugger io kernel sequences source-files.errors
|
USING: assocs debugger io kernel sequences source-files.errors
|
||||||
summary accessors continuations make math.parser io.styles namespaces
|
summary accessors continuations make math.parser io.styles namespaces
|
||||||
compiler.errors prettyprint ;
|
compiler.errors prettyprint source-files.errors.debugger ;
|
||||||
IN: tools.errors
|
IN: tools.errors
|
||||||
|
|
||||||
#! Tools for source-files.errors. Used by tools.tests and others
|
#! Tools for source-files.errors. Used by tools.tests and others
|
||||||
#! for error reporting
|
#! for error reporting
|
||||||
|
|
||||||
CONSTANT: +listener-input+ "<Listener input>"
|
|
||||||
|
|
||||||
: error-location ( error -- string )
|
|
||||||
[
|
|
||||||
[ file>> [ % ] [ +listener-input+ % ] if* ]
|
|
||||||
[ line#>> [ ": " % # ] when* ] bi
|
|
||||||
] "" make ;
|
|
||||||
|
|
||||||
M: source-file-error summary error>> summary ;
|
|
||||||
|
|
||||||
M: source-file-error error.
|
|
||||||
[ error-location print nl ]
|
|
||||||
[ asset>> [ "Asset: " write short. nl ] when* ]
|
|
||||||
[ error>> error. ]
|
|
||||||
tri ;
|
|
||||||
|
|
||||||
: errors. ( errors -- )
|
: errors. ( errors -- )
|
||||||
group-by-source-file sort-errors
|
group-by-source-file sort-errors
|
||||||
[
|
[
|
||||||
|
|
|
@ -168,3 +168,6 @@ PRIVATE>
|
||||||
] require-hook set-global
|
] require-hook set-global
|
||||||
|
|
||||||
M: vocab-spec where vocab-source-path dup [ 1 2array ] when ;
|
M: vocab-spec where vocab-source-path dup [ 1 2array ] when ;
|
||||||
|
|
||||||
|
! put here to avoid circularity between vocabs.loader and source-files.errors
|
||||||
|
{ "source-files.errors" "debugger" } "source-files.errors.debugger" require-when
|
||||||
|
|
Loading…
Reference in New Issue