line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Jmespath::ParseException; |
2
|
3
|
|
|
3
|
|
1539
|
use Moose; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
12
|
|
3
|
|
|
|
|
|
|
extends 'Jmespath::JMESPathException'; |
4
|
|
|
|
|
|
|
with 'Throwable'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has message => ( is => 'ro', |
7
|
|
|
|
|
|
|
default => 'Invalid jmespath expression' ); |
8
|
|
|
|
|
|
|
has expression => ( is => 'rw' ); |
9
|
|
|
|
|
|
|
has lex_position => ( is => 'ro' ); |
10
|
|
|
|
|
|
|
has token_type => ( is => 'ro' ); |
11
|
|
|
|
|
|
|
has token_value => ( is => 'ro' ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
override 'to_string', sub { |
14
|
|
|
|
|
|
|
my $self = shift; |
15
|
|
|
|
|
|
|
my $underline = ( ' ' x ( $self->lex_position + 1 ) ) . '^'; |
16
|
|
|
|
|
|
|
my $mf = '%s : Parse error at column %s token "%s" (%s), ' . |
17
|
|
|
|
|
|
|
'for expression:' . "\n" . '"%s"' . "\n" . '%s' . "\n"; |
18
|
|
|
|
|
|
|
return sprintf $mf, |
19
|
|
|
|
|
|
|
$self->message, |
20
|
|
|
|
|
|
|
$self->lex_position, |
21
|
|
|
|
|
|
|
$self->token_value, |
22
|
|
|
|
|
|
|
$self->token_type, |
23
|
|
|
|
|
|
|
$self->expression, |
24
|
|
|
|
|
|
|
$underline; |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
3
|
|
|
3
|
|
12488
|
no Moose; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
10
|
|
28
|
|
|
|
|
|
|
1; |