Parsing of selectors with underscore is broken

Project:GNU Smalltalk
Component:STInST
Category:bug
Priority:normal
Assigned:Unassigned
Status:active
Description

When parsing the GemStone MontiCello definition I stumbled about two issues:


st> STInST.RBParser parseExpression: 'self _foo'
RBAssignmentNode(self := foo)

st> STInST.RBParser parseExpression: '[:x:y | x+y]'
Object: RBParser new "<0x55913658>" error: (a #String):1: Variable name expected
Error(Exception)>>signal (ExcHandling.st:254)
...

According to ANSI Smalltalk the '_' is reserved by the implementation. Either we parse it or we reject it but it is certainly not an assignment?

The other one appears to be valid according to ANSI Smalltalk.

User login