1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel prettyprint io io.styles colors.constants compiler.units
4 fry debugger sequences locals.rewrite.closures smalltalk.ast
5 smalltalk.eval smalltalk.printer smalltalk.listener ;
8 : eval-interactively ( string -- )
11 dup nil? [ drop ] [ "Result: " write smalltalk>string print ] if
14 : smalltalk-listener ( -- )
15 "Smalltalk>" { { background COLOR: light-blue } } format bl flush readln
16 [ eval-interactively smalltalk-listener ] when* ;
18 MAIN: smalltalk-listener