dalehenrich / filetree

Monticello repository for directory-based Monticello packages enabling the use of git, svn, etc. for managing Smalltalk source code.
https://github.com/CampSmalltalk/Cypress
MIT License
133 stars 26 forks source link

Error parsing some method selectors #231

Closed dalehenrich closed 4 years ago

dalehenrich commented 4 years ago

Originally reported as GsDevKit/GsDevKit_home#298 from @brunobuzzi ...

It seems there is bug in ChangeList>>parseSelector: (or Scanner>>scanMessageParts:) (tested on GS 3.5.1 & 3.5.4). Try:

ChangeList parseSelector: 'myMethodName -1 to: 2 do: [:i |].'.

But the following will work ok :

ChangeList parseSelector: 'myMethodName || -1 to: 2 do: [:i |].'.

So it seems a border case when you have a negative number immediately after the selector. The following also will fail:

ChangeList parseSelector: 'myMethodName -1 '.

The workaround will be add empty temp definition at the beginning "||" of the method.

dalehenrich commented 4 years ago

As discussed here we should change MCFileTreeStCypressReader>>methodSelectorFor: to useRBParser >> parseMethodPattern: