Skip to content
This repository
Browse code

Make LANG pass on orig, not target, plus args.

This may get rid of some of the oddness we've seen with strings with
null bytes showing up. Also means we can pass arguments on to a rule
in another language.
  • Loading branch information...
commit c077b22a2462f40e1d4cc6d6351c67e5089e1d15 1 parent 84a13cb
Jonathan Worthington jnthn authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 src/HLL/Grammar.pm
6 src/HLL/Grammar.pm
@@ -783,12 +783,12 @@ An operator precedence parser.
783 783 $cur
784 784 }
785 785
786   - method LANG($lang, $regex) {
787   - my $lang_cursor := %*LANG{$lang}.'!cursor_init'(self.target(), :p(self.pos()));
  786 + method LANG($lang, $regex, *@args) {
  787 + my $lang_cursor := %*LANG{$lang}.'!cursor_init'(self.orig(), :p(self.pos()));
788 788 if self.HOW.traced(self) {
789 789 $lang_cursor.HOW.trace-on($lang_cursor, self.HOW.trace_depth(self));
790 790 }
791 791 my $*ACTIONS := %*LANG{$lang ~ '-actions'};
792   - $lang_cursor."$regex"();
  792 + $lang_cursor."$regex"(|@args);
793 793 }
794 794 }

0 comments on commit c077b22

Please sign in to comment.
Something went wrong with that request. Please try again.