Skip to content

Commit

Permalink
Perlito5 - misc/perl5_parser double-colon
Browse files Browse the repository at this point in the history
  • Loading branch information
fglock committed Jul 9, 2024
1 parent 737dd9d commit 5e86706
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions misc/perl5_parser/perl5_parser.pl
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,13 @@ sub parse_variable_interpolation {
my $sigil = $tokens->[$pos][1];
$pos++; # $
my $expr;
if ( $tokens->[$pos][0] == IDENTIFIER() ) {
if ( $tokens->[$pos][0] == IDENTIFIER() || $tokens->[$pos][0] == NUMBER() || $tokens->[$pos][0] == DOUBLE_COLON() ) {

# TODO $1 $2 $$
$expr = { type => 'BAREWORD', value => $tokens->[$pos][1], next => $pos + 1 };
# TODO special vars $$
$expr = parse_colon_bareword( $tokens, $pos );
if ( $expr->{FAIL} ) {
return parse_fail( $tokens, $index );
}

# TODO if sigil is not $#, check for [] {} ->
}
Expand Down

0 comments on commit 5e86706

Please sign in to comment.