[squeak-dev] The Inbox: ShoutTests-ct.34.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Thu Nov 25 14:46:40 UTC 2021

Hi Marcel,

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
An: squeak-dev
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 ====================

Name: ShoutTests-ct.34
Author: ct
Time: 7 April 2021, 5:20:15.847598 pm
UUID: a7f39f26-a6fb-f44e-aabb-931714b56ed8
Ancestors: ShoutTests-mt.33

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') -----
+ testChainAfterCascade
+ | types s |
+ s := 'x 1 positive; negative not'.
+ types := self tokenTypesIn: s.
+ self
+ assert: #(patternUnary number unary cascadeSeparator unary excessCode)
+ equals: types.!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211125/9a507e12/attachment.html>

More information about the Squeak-dev mailing list