From 92d5c683e63a1f3de9583892c879b283e0f17a68 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 26 Jun 2008 20:46:59 -0500 Subject: [PATCH] Fix :edit for nested parse errors --- extra/editors/editors.factor | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/extra/editors/editors.factor b/extra/editors/editors.factor index 29cbbca90e..78f6caf965 100755 --- a/extra/editors/editors.factor +++ b/extra/editors/editors.factor @@ -39,19 +39,29 @@ GENERIC: error-file ( error -- file ) GENERIC: error-line ( error -- line ) -M: lexer-error error-line line>> ; +M: lexer-error error-file + error>> error-file ; -M: source-file-error error-file file>> path>> ; +M: lexer-error error-line + [ error>> error-line ] [ line>> ] bi or ; -M: source-file-error error-line error>> error-line ; +M: source-file-error error-file + [ error>> error-file ] [ file>> path>> ] bi or ; -M: condition error-file error>> error-file ; +M: source-file-error error-line + error>> error-line ; -M: condition error-line error>> error-line ; +M: condition error-file + error>> error-file ; -M: object error-file drop f ; +M: condition error-line + error>> error-line ; -M: object error-line drop f ; +M: object error-file + drop f ; + +M: object error-line + drop f ; : :edit ( -- ) error get [ error-file ] [ error-line ] bi