help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] FileOut with class pragmas


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] FileOut with class pragmas
Date: Tue, 04 Jun 2013 19:01:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

Il 04/06/2013 11:14, Holger Hans Peter Freyther ha scritto:
> On Mon, Jun 03, 2013 at 10:55:23PM +0200, Paolo Bonzini wrote:
> 
>>> I think this is because I am not changing classPragmas to add my new
>>> class pragmas.
>>
>> Yes.
> 
> I stumbled across another issue. In the GSM 04.08 specs Information
> Elements (attributes) have a minimum and maximum length. I have used
> something like the below to handle that.
> 
> Object subclass: Foo [
>     Foo class >> valueSize: min max: max [
>     ]
> 
>     <valueSize: 1 max: 3>
> ]
> 
> this can not be expressed with the current classPragmas. So if I would
> return #valueSize from the classPragmas then the 'max' would be lost
> and if I return #valueSize:max: then it can not perform this selector?

Right, you need to split the pragma in two...

Paolo

> Any idea how to resolve that?
> 
> 
> 
>>> Is this something we could/should warning about?
>>
>> Not for all pragmas; some (import:, shape:) are filed out automatically.
>>  But these are just a few, they could be special cased out.  Otherwise
>> it seems like a useful warning.
> 
> I will add this as another linter (but I think the STInST ast doesn't
> have enough information for the pragmas to detect it).
> 
> 
> holger
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]