xsawyerx / guacamole

Guacamole is a parser toolkit for Standard Perl. It provides fully static BNF-based parsing capability to a reasonable subset of Perl.
https://metacpan.org/pod/Guacamole
20 stars 8 forks source link

Add for/while/until loops #24

Closed xsawyerx closed 4 years ago

xsawyerx commented 4 years ago

[This includes the commits from #15 and needs to be rebased before it's merged.]

This adds:

foreach my $foo (@bar) {...}
foreach $foo (@bar) {...}
foreach (@bar) {...}

while ( EXPR ) {...}
until ( EXPR ) {...}

Postfix of these is provided by #15.

After this MR, I want to cleanup the while/until from being under a ConditionOp to be a KeywordOp.