]> gitweb.factorcode.org Git - factor.git/blob - basis/eval/eval.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / basis / eval / eval.factor
1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: splitting parser compiler.units kernel namespaces
4 debugger io.streams.string ;
5 IN: eval
6
7 : eval ( str -- )
8     [ string-lines parse-fresh ] with-compilation-unit call ;
9
10 : eval>string ( str -- output )
11     [
12         parser-notes off
13         [ [ eval ] keep ] try drop
14     ] with-string-writer ;