[squeak-dev] The Inbox: ShoutTests-ct.34.mcz
Christoph.Thiede at student.hpi.uni-potsdam.de
Thu Nov 25 14:46:40 UTC 2021
this is indeed not valid Smalltalk code. In the test, I expected the last keyword (#not) to be parsed as #excessCode. At the moment, the Shout treats this syntax as valid syntax which has confused me already too often.
Given the confusion, I should probably rename this test or add a proper comment.
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 25. November 2021 15:04:57
Betreff: Re: [squeak-dev] The Inbox: ShoutTests-ct.34.mcz
Hi Christoph --
This also addresses ShoutCore-ct.85 sitting in the inbox.
The code snippet you want Shout to style is
x 1 positive; negative not
I don't see how this is valid Smalltalk code. Even like this
x := 1 positive; negative not
the trailing "not" cannot be compiled. Adding parentheses, it becomes valid:
x := (1 positive; negative) not.
...so can you elaborate on what you wanted to test here? I would expect that Shout's results for invalid Smalltalk code is ... undefined?
Am 07.04.2021 17:20:24 schrieb commits at source.squeak.org <commits at source.squeak.org>:
A new version of ShoutTests was added to project The Inbox:
==================== Summary ====================
Time: 7 April 2021, 5:20:15.847598 pm
Document a present bug that occurs when styling a method that contains multiple unary selectors after a cascade.
=============== Diff against ShoutTests-mt.33 ===============
Item was added:
+ ----- Method: SHParserST80Test>>testChainAfterCascade (in category 'tests') -----
+ | types s |
+ s := 'x 1 positive; negative not'.
+ types := self tokenTypesIn: s.
+ assert: #(patternUnary number unary cascadeSeparator unary excessCode)
+ equals: types.!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev