Skip to content

Commit

Permalink
Report line/column instead of offset as Pg::Parser now provides that …
Browse files Browse the repository at this point in the history
…info
  • Loading branch information
claesjac committed Jan 15, 2012
1 parent 6c5987c commit 8079503
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Pg/Checksource.pm
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ sub run {
my $stream = Array::Stream::Transactional->new($tokens);
while ($stream->has_more) {
my $t = $stream->current;
$self->debug && say "Checking token ", $t->type, " with value '", $t->src, "' at offset: ", $t->offset;
$self->debug && say "Checking token ", $t->type, " with value '", $t->src, "' at line: ", $t->line, " column: ", $t->column;
for my $rule (@token_rules) {
unless ($rule->check($t, $stream)) {
say "'", $t->src, "' at offset ", $t->offset, " doesn't conform to '", $rule->name, "'";
say "'", $t->src, "' at line ", $t->line, " column ", $t->column, " doesn't conform to '", $rule->name, "'";
}
}

Expand Down

0 comments on commit 8079503

Please sign in to comment.