On 08/12/2016 11:40 AM, Nicolai Hess wrote:


2016-08-12 20:30 GMT+02:00 Dale Henrichs <dale.henrichs@gemtalksystems.com>:
`'|' expected` is�� not the error message I would expect when the message pattern is missing from a method and I try to accept in browser:


�� �� | text |
�� �� text�� '|' expected ->:= self requestPassword
�� �� �� �� ifTrue: [ UIManager default requestPassword: self prompt ]
�� �� �� �� ifFalse: [ UIManager default request: self prompt initialAnswer: self template ].
�� �� ^ (text isNil or: [ text isEmpty ])
�� �� �� �� ifTrue: [ nil ]
�� �� �� �� ifFalse: [ text ]

The highlighter was also confused turning red at the `->` instead at the very beginning of the method ...

yeah, this is a funny one.
I onced debugged the parser to find out why that's happening. Can you spot why this is a valid method :

| text |
| ^ text

:)
I cheated and used the syntax highlighting to give me subtle but import clues :)�� Things I missed when initially trying to figure out what I had done wrong ... perhaps an error message that special cases this would be called for: "'|' expected or missing message message pattern" ... There are at least two developers who expected the syntax highlighter to do a better job ... and I sent this thinking about newbies running into what I assume would be a common mistake ...

Dale