Suggested fileIn code for repl.slate

Ken Causey ken at kencausey.com
Wed Jul 28 09:10:26 PDT 2004


I'm sure someone else can reply to this more authoritatively.  But my
understanding is that fileIn has been deprecated in favor of load:.

In other words replace

'src/collections.slate' fileIn.

with

load: 'src/collections.slate'.

Ken


On Wed, 2004-07-28 at 10:12, John Leuner wrote:
> Could you add a fileIn method to repl.slate (as below or something
> similar)?
> 
> Index: bootstrap/mobius/repl.slate
> ===================================================================
> RCS file: /var/lib/cvs/slate/slate/bootstrap/mobius/repl.slate,v
> retrieving revision 1.8
> diff -u -r1.8 repl.slate
> --- bootstrap/mobius/repl.slate 23 Jul 2004 05:14:42 -0000      1.8
> +++ bootstrap/mobius/repl.slate 28 Jul 2004 15:34:17 -0000
> @@ -5,6 +5,15 @@
>  REPL addSlot: #lineCount valued: 0.
>  REPL addSlot: #basePrompt valued: '> '.
>  
> +s@(String traits) fileIn
> +[ | input aparser interp p|
> +" Console ; 'Filing in $'' ; s ; '$'.$\n'."
> + input: (File open: s).
> + aparser: ((Syntax Parser clone) newOn: (input reader)).
> + [ aparser atEnd ] whileFalse: [ p: aparser next. (lobby interpretHook:
> [ p evaluateIn: lobby ])].
> + input close.
> +].
> +
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /archives/slate/attachments/20040728/0736fe5a/attachment.pgp


More information about the Slate mailing list