Skip to content

Commit

Permalink
Perlito5 - misc/perl5_parser comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fglock committed Jul 13, 2024
1 parent fc07430 commit af72d85
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions misc/perl5_parser/perl5_parser.pl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,37 @@
# why returning FAIL instead of die(): it allows for backtracking and for error handling in a different place.
# but eventually I'd rather get rid of all backtracking
#
# TODO
#
# namespaces
#
# features
# postderef feature
# try-catch
#
# keep track of declarations
# sub
# my, our, local, state
#
# BEGIN
#
# continue, else, elsif
#
# label:
#
# attributes
#
# subroutine
# signatures
# prototype
#
# UTF8 parsing
# delimiter pairs
#
# warnings
#
# tests
#

my %QUOTE_PAIR = (
'{' => '}',
Expand Down Expand Up @@ -126,6 +157,18 @@
#
# Sub-Languages are code regions that don't follow the regular parsing rules
#
# types of syntax rules:
#
# // raw string
# //m 1 raw string and modifier
# ///m 2 raw strings and modifier
# - | () no arguments, optional parenthesis
# { BLOCK } plain block, no parenthesis
# { BLOCK } | ( { BLOCK } ) plain block, optional parenthesis
# - | () | EXPR | ( EXPR ) zero or 1 argument, optional parenthesis
# LIST(precedence) list, with precedence, optional parenthesis
# LIST(slurpy) list, all arguments, optional parenthesis
#
my $ONE_ARG_STUB = sub { # qw/abc def/
my ( $tokens, $index, $name, $ast ) = @_;
my $pos = $index;
Expand Down

0 comments on commit af72d85

Please sign in to comment.