--- /dev/null
+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 ;
+
! See http://factorcode.org/license.txt for BSD license.
USING: assocs debugger io kernel sequences source-files.errors
summary accessors continuations make math.parser io.styles namespaces
-compiler.errors prettyprint ;
+compiler.errors prettyprint source-files.errors.debugger ;
IN: tools.errors
#! Tools for source-files.errors. Used by tools.tests and others
#! 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 -- )
group-by-source-file sort-errors
[
word>> name>> "The word " " cannot be executed because it failed to compile" surround ;
M: not-compiled error.
- [ summary print nl ] [ error>> error. ] bi ;
\ No newline at end of file
+ [ summary print nl ] [ error>> error. ] bi ;
] require-hook set-global
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