fileIn (Squeak)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

fileIn (Squeak)

Steve Alan Waring
Hi,

I am having trouble filing in Squeak source with the following format:
====
"Filed out from Dolphin Smalltalk 2002 release 5.00"!
Object subclass: #AATest
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
classInstanceVariableNames: ''!
!AATest commentStamp: '<historical>' prior: 0!
A Comment!

!AATest methodsFor!
foo
^'bar'! !

====

AATest>>foo does not get compiled.

Adding the following method seems to fix the problem:

SingleChunkReader>>fileInFrom: aSourceFiler
| chunk |
(aSourceFiler atEnd or: [(chunk := aSourceFiler nextChunk) isEmpty])
ifFalse: [self chunk: chunk].
^endAction value


Thanks,
Steve Waring


Reply | Threaded
Open this post in threaded view
|

Re: fileIn (Squeak)

Blair McGlashan
"Steve Waring" <[hidden email]> wrote in message
news:[hidden email]...
> Hi,
>
> I am having trouble filing in Squeak source with the following format:
> ====
>...[Squeak format source snipped]...

The commentStamp in Squeak's file out makes them invalid as normal chunk
files. They have a chunk start marker, but no doubled end marker, therefore
the following chunk is treated as part of the comment too. The
SingleChunkReader was an attempt at reading Squeak files, but I don't think
it ever really worked, so thanks for your patch. (#669)

Regards

Blair