Skip to content

Commit

Permalink
[Yapsi] blocks now return values
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Masak committed Apr 26, 2010
1 parent d370ddf commit 83071dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Yapsi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,11 @@ class Yapsi::Compiler {
}

multi method sicify(Match $/, 'block') {
my ($register, $variable);
for $<statementlist><statement> -> $statement {
self.sicify($statement, 'statement');
($register, $variable) = self.sicify($statement, 'statement');
}
return ($register, $variable);
}

multi method sicify(Match $/, $node) {
Expand Down

0 comments on commit 83071dc

Please sign in to comment.