Re: More Pugs Bugs

2005-04-05 Thread Autrijus Tang
On Mon, Apr 04, 2005 at 09:01:20PM -0400, Stevan Little wrote: eval 'sub foobar { return if 1; }'; I've fixed everything except this. I'm not exactly sure how the postfix form of if is supposed to work here, because the first thing the parser tries is to parse it as return(if(1)), as a valid

Re: More Pugs Bugs

2005-04-05 Thread Larry Wall
On Tue, Apr 05, 2005 at 09:22:29PM +0800, Autrijus Tang wrote: : On Mon, Apr 04, 2005 at 09:01:20PM -0400, Stevan Little wrote: : eval 'sub foobar { return if 1; }'; : : I've fixed everything except this. I'm not exactly sure how the postfix : form of if is supposed to work here, because the

Re: More Pugs Bugs

2005-04-05 Thread Autrijus Tang
On Tue, Apr 05, 2005 at 08:24:42AM -0700, Larry Wall wrote: That's why there's a statement_control:if, and there's a statement_modifer:if, but there's no prefix:if. If you see a statement modifier in the middle of an expression, it must be interpreted as a statement modifier regardless of the

Re: More Pugs Bugs

2005-04-05 Thread Larry Wall
On Wed, Apr 06, 2005 at 12:32:37AM +0800, Autrijus Tang wrote: : On Tue, Apr 05, 2005 at 08:24:42AM -0700, Larry Wall wrote: : That's why there's a statement_control:if, and there's a : statement_modifer:if, but there's no prefix:if. If you see : a statement modifier in the middle of an

Re: More Pugs Bugs

2005-04-05 Thread Autrijus Tang
On Tue, Apr 05, 2005 at 10:33:00AM -0700, Larry Wall wrote: : Aye. Is there an idea on how the two forms of `if` would be defined : using plain Perl 6? That's exactly what the syntactic category syntax is for, and why parsing has to be done indirectly in terms of syntactic categories, if

More Pugs Bugs

2005-04-04 Thread Stevan Little
Got another one! This one is your basic parsing error, and hopefully easily fixed. Basically the return statement will not work without a value to return, unless you have a () after it (which I assume is not correct syntax, but also not really wrong syntax (but I will leave that for the