Hi,

I finally understand the issue (I have already beeng debugging this
in autumn).

  STInST.RBParser parseExpression: '#(##(1/2))'   -> error

This is because of:

  (STInST.RBScanner on: '#(##(1/2))') next next   -> $)

and this is because of...


    scanLiteralArrayParts [
        <category: 'private-scanning'>
        currentCharacter == $# ifTrue: [^self scanLiteral].

... 

    scanLiteral [
        <category: 'private-scanning'> 
        self step.
        self stripSeparators.
...
        currentCharacter == $# ifTrue: [^self scanExtendedLiterals].



    scanExtendedLiterals [
        <category: 'private-scanning numbers'>
        | token |
        self step.
        currentCharacter == $( 
            ifTrue:
                [self step.
                ^RBOptimizedToken start: tokenStart].
        self scannerError: 'Expecting parentheses'
    ]


...


So scanExtendedLiterals will consume the $( of ##( but the $) of the literal 
will
not be consumed leaving the extra token.

Now my question is if the optimized token should recursively scan the
literals? Or should the RBScanner count $( and $) to know that it needs
to read one more item?


holger

_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to