]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/listener/listener.factor
basis: use lint.vocabs tool to trim using lists
[factor.git] / basis / listener / listener.factor
index 717b459516aef215b6e25b6b1a5bef9fbd1ac4e5..73f87028934fa3b98a4959f3bc22e09b1c7a8b39 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors colors combinators.short-circuit
 compiler.units continuations debugger fry io io.styles kernel lexer
-locals math math.parser namespaces parser parser.notes prettyprint
+math math.parser namespaces parser parser.notes prettyprint
 sequences sets source-files.errors system vocabs vocabs.loader
 vocabs.parser ;
 IN: listener
@@ -116,15 +116,13 @@ t error-summary? set-global
         ] dip
     ] when stack. ;
 
-: datastack. ( datastack -- )
-    display-stacks? get [
-        [ nl "--- Data stack:" title. trimmed-stack. ] unless-empty
-    ] [ drop ] if ;
+: ?datastack. ( datastack -- )
+    display-stacks? get [ datastack. ] [ drop ] if ;
 
 :: listener-step ( datastack -- datastack' )
     error-summary? get [ error-summary ] when
     visible-vars.
-    datastack datastack.
+    datastack ?datastack.
     input-stream get prompt prompt.
     flush
     [
@@ -140,8 +138,8 @@ t error-summary? set-global
         if
     ] recover ;
 
-: (listener) ( datastack -- )
-    listener-step (listener) ;
+: listener-loop ( datastack -- )
+    listener-step listener-loop ;
 
 PRIVATE>
 
@@ -224,7 +222,7 @@ SYMBOL: interactive-vocabs
 : listener ( -- )
     [
         parser-quiet? off
-        [ { } (listener) ] with-return
+        [ { } listener-loop ] with-return
     ] with-interactive-vocabs ;
 
 : listener-main ( -- )