Skip to content
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

Parsing of prefix reduce doesn't like spaces #5106

Closed
p6rt opened this issue Jan 29, 2016 · 5 comments
Closed

Parsing of prefix reduce doesn't like spaces #5106

p6rt opened this issue Jan 29, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jan 29, 2016

Migrated from rt.perl.org#127427 (status was 'rejected')

Searchable as RT127427$

@p6rt
Copy link
Author

p6rt commented Jan 29, 2016

From @b2gills

If you add any spaces anywhere in reduce part of the following it fails to compile.
Rakudo complains about two terms in a row immediately following the reduce part if you do.

  [[&({$^a*2+$^b})]] 1,2,3

That is this should be valid

  [[&( { $^a * 2 + $^b } )]] 1,2,3

It works if you write it as infix operators

  1 [&( { $^a * 2 + $^b } )] 2 [&( { $^a * 2 + $^b } )] 3

This also affects triangle reduce

  [\[&({$^a*2+$^b})]] 1,2,3

@p6rt
Copy link
Author

p6rt commented Aug 1, 2016

From @zoffixznet

Still present today in 5c5ef1

<Zoffix> m​: [[&( { $^a * 2 + $^b } )]] 1,2,3
<camelia> rakudo-moar 5c5ef1​: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>​:1␤------> [[&( { $^a * 2 + $^b } )]]⏏ 1,2,3␤ expecting any of​:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ …»

--
Cheers,
ZZ | https://twitter.com/zoffix

@p6rt
Copy link
Author

p6rt commented Aug 2, 2016

From @zoffixznet

As per TimToady, such whitespace is actually not allowed in this op, to help distinguish them from [1, 2, 3] and such​: http://irclog.perlgeek.de/perl6/2016-08-02#i_12956488

--
Cheers,
ZZ | https://twitter.com/zoffix

@p6rt
Copy link
Author

p6rt commented Aug 2, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 2, 2016

@zoffixznet - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant