quarkiverse / quarkus-bon-jova-rockstar

An implementation of Rockstar as a JVM language
https://codewithrockstar.com/
3 stars 2 forks source link

Tolerate constants in poetic number literals, except as the first word #86

Closed holly-cummins closed 9 months ago

holly-cummins commented 9 months ago

The spec says

A poetic number literal begins with a variable name, followed by the keyword is, or the aliases are, was or were. As long as the next symbol is not a Literal Word, the rest of the line is treated as a decimal number in which the values of consecutive digits are given by the lengths of the subsequent barewords, up until the end of the line.

I've now fixed the implementation. It's the risky sort of fix where something else might regress, so be aware. Hopefully the tests caught everything! It was lucky the second word in your example was 'low', @hannotify, since my fix initially broke toleration for that word ... but your example caught it (phew!).