Fixes for inspector, introduce ,inspect command
part of darcs patch Thu Sep 22 13:24:07 EEST 2005 Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
This commit is contained in:
parent
2fe9ca9f66
commit
45f1bb41b3
|
@ -99,9 +99,6 @@
|
|||
|
||||
|
||||
|
||||
(define (inspect-value val)
|
||||
(error "not yet"))
|
||||
|
||||
(define key-d 100)
|
||||
(define key-u 117)
|
||||
(define key-return 10)
|
||||
|
@ -136,7 +133,8 @@
|
|||
(define (inspect-next-continuation)
|
||||
(if (continuation? val)
|
||||
(push-val! (continuation-parent val))
|
||||
(set-header-message! header
|
||||
(set-header-message!
|
||||
header
|
||||
"Can't go down from a non-continuation.")))
|
||||
|
||||
(define (pop-val!)
|
||||
|
@ -206,4 +204,15 @@
|
|||
(debug-message "inspector did not handle message " message))))))
|
||||
|
||||
(register-plugin!
|
||||
(make-view-plugin make-inspector exception-continuation?))
|
||||
(make-view-plugin make-inspector
|
||||
exception-continuation?))
|
||||
|
||||
(define-record-type inspection-object :inspection-object
|
||||
(make-inspection-object val)
|
||||
inspection-object?
|
||||
(val inspection-object-val))
|
||||
|
||||
(register-plugin!
|
||||
(make-view-plugin (lambda (iv buffer)
|
||||
(make-inspector (inspection-object-val iv) buffer))
|
||||
inspection-object?))
|
|
@ -288,8 +288,9 @@
|
|||
|
||||
|
||||
(define (eval-command-in-scheme-mode command-line)
|
||||
(with-fatal-error-handler*
|
||||
display-error-and-continue
|
||||
(with-fatal-and-capturing-error-handler
|
||||
(lambda (condition raw-continuation continuation decline)
|
||||
raw-continuation)
|
||||
(lambda ()
|
||||
(if (scheme-command-line? command-line)
|
||||
(process-scheme-command command-line)
|
||||
|
|
|
@ -432,10 +432,13 @@
|
|||
|
||||
;;; inspector
|
||||
|
||||
(define-interface nuit-inspector-interface
|
||||
(export inspect-value))
|
||||
(define-interface inspection-objects-interface
|
||||
(export make-inspection-object
|
||||
inspection-object?))
|
||||
|
||||
(define-structure nuit-inspector-plugin nuit-inspector-interface
|
||||
(define-structures
|
||||
((nuit-inspector-plugin (export))
|
||||
(inspection-objects inspection-objects-interface))
|
||||
(open scheme
|
||||
inspector-internal
|
||||
continuations
|
||||
|
@ -514,6 +517,7 @@
|
|||
package-commands-internal
|
||||
package-mutation
|
||||
|
||||
inspection-objects
|
||||
eval-environment)
|
||||
(files scheme-commands))
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
(define (split-scheme-command-line command-line)
|
||||
(let ((tokens (string-tokenize command-line)))
|
||||
(values (string->symbol (string-drop (car tokens) 1))
|
||||
(values (string-drop (car tokens) 1)
|
||||
(cdr tokens))))
|
||||
|
||||
(define (scheme-command-line? command-line)
|
||||
|
@ -10,7 +10,7 @@
|
|||
command-prefix))
|
||||
|
||||
(define (eval-scheme-command command args)
|
||||
(case command
|
||||
(case (string->symbol command)
|
||||
((in)
|
||||
(set-evaluation-package! (string->symbol (car args)))
|
||||
(string-append "moved to package " (car args)))
|
||||
|
@ -24,4 +24,11 @@
|
|||
((user)
|
||||
(set-evaluation-package! 'nuit-eval)
|
||||
"moved to package nuit-eval")
|
||||
(else (error "unknwon scheme command"))))
|
||||
((inspect)
|
||||
(if (null? args)
|
||||
",inspect requires an argument"
|
||||
(make-inspection-object
|
||||
(eval-string (string-join args)))))
|
||||
((exit)
|
||||
(exit))
|
||||
(else (error "unknwon scheme command" command))))
|
||||
|
|
Loading…
Reference in New Issue