| 
									
										
										
										
											2009-03-31 22:23:09 -04:00
										 |  |  | ! Copyright (C) 2009 Slava Pestov. | 
					
						
							|  |  |  | ! See http://factorcode.org/license.txt for BSD license. | 
					
						
							| 
									
										
										
										
											2009-04-01 03:06:57 -04:00
										 |  |  | USING: io.files io.encodings.utf8 | 
					
						
							| 
									
										
										
										
											2009-04-01 03:08:49 -04:00
										 |  |  | compiler.units smalltalk.parser smalltalk.compiler | 
					
						
							|  |  |  | smalltalk.library ;
 | 
					
						
							| 
									
										
										
										
											2009-03-31 22:23:09 -04:00
										 |  |  | IN: smalltalk.eval | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : eval-smalltalk ( string -- result )
 | 
					
						
							|  |  |  |     [ parse-smalltalk compile-smalltalk ] with-compilation-unit | 
					
						
							| 
									
										
										
										
											2009-04-01 03:06:57 -04:00
										 |  |  |     call( -- result ) ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : eval-smalltalk-file ( path -- result )
 | 
					
						
							|  |  |  |     utf8 file-contents eval-smalltalk ;
 |