Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Override FAILGOAL in HLL::Grammar and get it to delegate to panic, so…
… we get a line number.
  • Loading branch information
jnthn committed Jun 9, 2012
1 parent 7176d14 commit ea9ceea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/HLL/Grammar.pm
Expand Up @@ -321,6 +321,14 @@ of the match.
@args.push('"');
nqp::die(nqp::join('', @args))
}

method FAILGOAL($goal) {
my $sub := Q:PIR {
%r = getinterp
%r = %r['sub';1]
};
self.panic("Unable to parse ", ~$sub, ", couldn't find final $goal");
}
=begin
Expand Down

0 comments on commit ea9ceea

Please sign in to comment.