We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18adbca commit 7eb7c1bCopy full SHA for 7eb7c1b
lib/PPI/Token/Prototype.pm
@@ -61,10 +61,9 @@ sub __TOKENIZER__on_char {
61
62
# Suck in until we find the closing paren (or the end of line)
63
pos $t->{line} = $t->{line_cursor};
64
- if ( $t->{line} =~ m/\G(.*?(?:\)|$))/gc ) {
65
- $t->{token}->{content} .= $1;
66
- $t->{line_cursor} += length $1;
67
- }
+ die "regex should always match" if $t->{line} !~ m/\G(.*?(?:\)|$))/gc;
+ $t->{token}->{content} .= $1;
+ $t->{line_cursor} += length $1;
68
69
# Shortcut if end of line
70
return 0 unless $1 =~ /\)$/;
0 commit comments