Commits

Anonymous committed 75018de

simplify exeunts

Comments (0)

Files changed (2)

src/parser/actions.pm

 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;
 }

src/parser/grammar.pg

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