<div dir="ltr"><div dir="ltr"><div>There are not many ShoutTests that could ensure that I'm no the right track...</div><div><div>And Shout code is hard to read for me (see below).</div>It's also strange to have to change such a central method after all these years of service.</div>Many reasons for a stage in inbox, if ever a few pairs of eyes are browsing there...</div><div dir="ltr"><br><div><rant><br>I find this Shout Parser selector particularly misleading...<br>It's hard to guess that #isSelectorCharacter:  is going to check exclusively for binary selectors before I browse the implementation details.</div><div>Should it be named #isBinarySelectorCharacter:, I could eventually omit such browsing.<br></div><div><br></div><div>In a lesser way, I also do not like self isName, self isBinary, self isKeyword,...</div><div>The intention is to check for the currentToken, not self.</div><div>They have the advantage of being short, but reading the code gives a strange taste.</div><div>If I wanted to avoid the heavy isCurrentTokenAName, isCurrenTokenABinarySelector, isCurrentTokenAKeyword, ... maybe I would just use has instead of is?<br></div><br><div>I've also ran the Shout Parser through a Debugger, and I encountered a lot of redundancy during the tokens scan (those isName isKeyword... are ran several consecutive times).<br></rant><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 7 avr. 2019 à 15:24, <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Nicolas Cellier uploaded a new version of ShoutCore to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/ShoutCore-nice.63.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/ShoutCore-nice.63.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: ShoutCore-nice.63<br>
Author: nice<br>
Time: 7 April 2019, 3:24:31.721529 pm<br>
UUID: 7440b898-b497-493b-adfa-67aef04e0980<br>
Ancestors: ShoutCore-eem.62<br>
<br>
Attempt to fix highlighting of 1to:-1<br>
<br>
I don't see the point of testing the presence of a binary selector character after a colon $:, except maybe the case of assignment :=, so only test that case.<br>
<br>
=============== Diff against ShoutCore-eem.62 ===============<br>
<br>
Item was changed:<br>
  ----- Method: SHParserST80>>scanIdentifier (in category 'scan') -----<br>
  scanIdentifier<br>
<br>
        | c start |<br>
        start := sourcePosition.<br>
        [<br>
                (c := self nextChar) isAlphaNumeric<br>
                        or: [ allowUnderscoreSelectors and: [ c == $_ ] ] ] whileTrue.<br>
+       (c == $: and: [ self peekChar ~= $= ]) <br>
-       (c == $: and: [ (self isSelectorCharacter: self peekChar) not ]) <br>
                ifTrue: [ self nextChar ].<br>
        currentToken := source copyFrom: start to: sourcePosition - 1.<br>
        currentTokenSourcePosition := start!<br>
<br>
<br>
</blockquote></div>