Permalink
Browse files

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...
jnthn committed Oct 27, 2012
1 parent 84a13cb commit c077b22a2462f40e1d4cc6d6351c67e5089e1d15
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/HLL/Grammar.pm
View
@@ -783,12 +783,12 @@ An operator precedence parser.
$cur
}
- method LANG($lang, $regex) {
- my $lang_cursor := %*LANG{$lang}.'!cursor_init'(self.target(), :p(self.pos()));
+ method LANG($lang, $regex, *@args) {
+ my $lang_cursor := %*LANG{$lang}.'!cursor_init'(self.orig(), :p(self.pos()));
if self.HOW.traced(self) {
$lang_cursor.HOW.trace-on($lang_cursor, self.HOW.trace_depth(self));
}
my $*ACTIONS := %*LANG{$lang ~ '-actions'};
- $lang_cursor."$regex"();
+ $lang_cursor."$regex"(|@args);
}
}

0 comments on commit c077b22

Please sign in to comment.