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

Rakudo thinks there is an implied semicolon after loop { ... } #761

Closed
p6rt opened this issue Mar 10, 2009 · 9 comments
Closed

Rakudo thinks there is an implied semicolon after loop { ... } #761

p6rt opened this issue Mar 10, 2009 · 9 comments

Comments

@p6rt
Copy link

p6rt commented Mar 10, 2009

Migrated from rt.perl.org#63760 (status was 'resolved')

Searchable as RT63760$

@p6rt
Copy link
Author

p6rt commented Mar 10, 2009

From @masak

<masak> rakudo​: loop { say "OH HAI"; last } while 1
<p6eval> rakudo 95ce39​: OUTPUT«OH HAI [...]
<masak> moritz_​: why does it do that?
<moritz_> I thinks that the statement is ended after the }
<moritz_> then tries to parse the while as a loop
<moritz_> fails
<moritz_> then parses it as a sub call
<masak> moritz_​: that's just wrong.
<moritz_> it is.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Mar 10, 2009

From @pmichaud

STD.pm also has a few parsing issues in this respect (and Rakudo has
been trying to follow STD.pm here).

We'll wait for STD.pm to settle out a bit and then try updating Rakudo
to match again.

Pm

@p6rt
Copy link
Author

p6rt commented Mar 10, 2009

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

@p6rt
Copy link
Author

p6rt commented Sep 8, 2009

From @masak

STD seems to be treating this case correctly nowadays​:

<jnthn> std​: loop { say "OH HAI"; last } while 1
<p6eval> std 28206​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Missing semicolon or
comma after block [...]
* masak adds to the ticket that STD appears to do the right thing nowadays.

@p6rt
Copy link
Author

p6rt commented Mar 24, 2010

From @jnthn

On Mon Sep 07 23​:28​:44 2009, masak wrote​:

STD seems to be treating this case correctly nowadays​:

<jnthn> std​: loop { say "OH HAI"; last } while 1
<p6eval> std 28206​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Missing
semicolon or
comma after block [...]
* masak adds to the ticket that STD appears to do the right thing
nowadays.

Rakudo also reports missing block now; I think this is enough, once we
have a test, to close the ticket. Assigning to moritz++.

Jonathan

@p6rt
Copy link
Author

p6rt commented Feb 27, 2011

From @zhuomingliang

hello, I don't think rakudo follows std, and rakudo gives a wrong error
message.

<JimmyZ>std​: loop { say "OH HAI"; last } while 1
<p6eval>std 4608239​: OUTPUT«===SORRY!===␤Strange text after block
(missing comma, semicolon, comment marker?) at /tmp/Y1yNm6yqmu line
1​:␤------> loop { say "OH HAI"; last } ⏏while 1␤ expecting horizontal
whitespace␤Parse failed␤FAILED 00​:01 119m␤»

<JimmyZ>rakudo​: loop { say "OH HAI"; last } while 1
<p6eval>rakudo 6cf616​: OUTPUT«===SORRY!===␤Missing block at line 22,
near ""␤»

@p6rt
Copy link
Author

p6rt commented Mar 24, 2011

From @kyleha

I put a test in S04-statements/loop.t, but I'm not sure it's valid now that I think about it.

# RT #​63760
eval_dies_ok 'loop { say "# RT63760"; last } while 1',
  '"loop {} while" is a syntax error (RT 63760)';

@p6rt
Copy link
Author

p6rt commented Jan 6, 2012

From @moritz

test passes, closing ticket.

@p6rt
Copy link
Author

p6rt commented Jan 6, 2012

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jan 6, 2012
@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant