1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: colors debugger io io.styles kernel smalltalk.ast
4 smalltalk.eval smalltalk.printer ;
7 : eval-interactively ( string -- )
10 dup nil? [ drop ] [ "Result: " write smalltalk>string print ] if
13 : smalltalk-listener ( -- )
14 "Smalltalk>" { { background COLOR: light-blue } } format bl flush readln
15 [ eval-interactively smalltalk-listener ] when* ;
17 MAIN: smalltalk-listener