1. riffraff
  2. shakespeare-parrot

Commits

gabriele renzi  committed 75018de

simplify exeunts

  • Participants
  • Parent commits 2dc97c8
  • Branches default

Comments (0)

Files changed (2)

File src/parser/actions.pm

View file
 method exeunts($/, $k) {
   my $past := PAST::Stmts.new();
 
-  if $k eq 'list' {
+  if $<charlist> == 0 {
+    $past.push(mkcall0('exeunt_omnes'));
+  }
+  else {
     for $<charlist><character> {
       my $res := mkcall('exit', mkstr($_));
       $past.push($res);
     }
-  }
-  else {
-    $past.push(mkcall0('exeunt_omnes'));
   } 
   make $past;
 }

File src/parser/grammar.pg

View file
   {*}
 }
 rule charlist {
-  <character> ['and' <character>]*
+  <character>? ['and' <character>]*
 }
 rule sentence {
   | <tap> {*}  #= tap