Paste: Inline listener history continuations

Author: dharmatech
Mode: factor
Date: Fri, 21 Nov 2008 15:17:06
Plain Text |
: continue. ( -- )
  [ ] callcc0 "Continue" swap '[ drop [ _ continue ] call-listener ]
  <bevel-button> gadget. ;

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

: listen ( -- )
  visible-vars.
  stacks.
  prompt.
  continue.
  [ read-quot [ [ error-hook get call ] recover ] [ bye ] if* ]
  [
    dup lexer-error?
      [ error-hook get call ]
      [ rethrow ]
    if
  ]
  recover ;

New Annotation

Summary:
Author:
Mode:
Body: