help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] [PATCH] Fix keyword attributes in STCompiler


From: Holger Hans Peter Freyther
Subject: Re: [Help-smalltalk] [PATCH] Fix keyword attributes in STCompiler
Date: Fri, 4 Apr 2014 11:40:08 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Apr 02, 2014 at 04:46:46PM +0200, Gwenaël Casaccio wrote:
> Hi,
> 
> STCompiler can't handle keyword attributes here is a fix.
>       arguments := WriteStream on: Array new.
>       currentToken := self scanTokenFrom: scanner.
> +        currentToken isIdentifier                                            
>    
> +                    ifTrue: [ (self scanTokenFrom: scanner) value == #> 
> ifFalse: [^self compileError: 'method attributes must end with ''>'''].  
> +                              selectorBuilder nextPutAll: currentToken 
> value. ]
> +                    ifFalse: [
>       [currentToken isBinary and: [currentToken value == #>]] whileFalse: 
>               [currentToken isKeyword 
>                   ifFalse: [^self compileError: 'keyword expected in method 
> attribute'].
> @@ -994,7 +998,7 @@ indexed'' bytecode. The resulting stream is
>               node := argParser parseBinaryMessageNoGreater.
>               node := RBSequenceNode statements: {node}.
>               arguments nextPut: (self class evaluate: node parser: 
> argParser).
> -             currentToken := argParser currentToken].
> +             currentToken := argParser currentToken]].

Oh ha? Formatting is very odd here. Can you fix/align it?

> +    testAttributes [
> +        <category: 'testing'>
> +
> +        self deny: (Smalltalk includesGlobalNamed: #CompilerAttributes).

> +        self assert: ((Smalltalk CompilerAttributes CAttributes) >> #foo2) 
> attributes first arguments second = 234.

Can you delete the CompilerAttributes namespace and classes?
This way we can run the unit test multiple times (e.g. when VisualGST
works more reliable we will end up doing it).



reply via email to

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