New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"decimal point must be followed..." error is too eager #2094

Closed
zoffixznet opened this Issue Jul 18, 2018 · 0 comments

Comments

Projects
None yet
3 participants
@zoffixznet
Contributor

zoffixznet commented Jul 18, 2018

It should probably check we're not gonna call the prefix-as-posfix before giving up entirely and throwing:

19:54 | Zoffix | m: say 42.:<->
-- | -- | --
19:54 | camelia | rakudo-moar a847abe52: OUTPUT: «=== SORRY!===  Error while compiling <tmp>␤Decimal point must be followed by digit␤at <tmp>:1␤------> say 42. ⏏ :<-> ␤»

19:54 | Zoffix | m: say (42).:<->
19:54 | camelia | rakudo-moar a847abe52: OUTPUT: «-42␤»

@zoffixznet zoffixznet added the LTA label Jul 18, 2018

ribbon-otter added a commit to ribbon-otter/rakudo that referenced this issue Aug 18, 2018

Allow prefix calls with .:< ... > on integer literals
Fix Github #2094. Before this commit, '42.:<->' would error because the
check which prevented integers ending with fullstops was overly
aggressive: any time an integer was followed by '.:', an error would be
generated. With this commit, an integer followed by '.:' will only error
if the next thing after it is not '<' then a prefix operator then '>'

ribbon-otter added a commit to ribbon-otter/rakudo that referenced this issue Aug 26, 2018

Add support for all coloncircumfix in the form 42.:<->
Before only `42.:<->` was permitted. This commit weakens numbers-may-not-end-with-decimal error checking to support `42.:<<->>`, `42.:['-']`, etc to bring it inline with `(42).:['-']`, `(42).:['-']`, etc working. These are the requested changes that AlexDaniel made with regard to my pull request to fix GitHub #2094.

@lizmat lizmat closed this Sep 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment