Skip to content

Commit

Permalink
rationalise subroutine parsing rules
Browse files Browse the repository at this point in the history
Now that the parser rules have been split into separate rules for subs
under 'use feature "signatures"' and not, refine the rules to reflect the
different regimes. In particular:

1) no longer include 'proto' in the signature variants: as it happens the
toker would never return a proto THING under signatures anyway, but
removing it from the grammar makes it clearer what's expected and not
expected.

2) Remove 'subsignature' from non-sig rules: what used to happen before
was that outside of 'use feature "signatures"', it might still try to
parse a signature, e.g.

    $ perl5279 -we 'sub f :lvalue ($$@) { $x = 1 }'
    Illegal character following sigil in a subroutine signature at -e line
    1, near "($"
    syntax error at -e line 1, near "$$@"

Now it's just a plain syntax error.
  • Loading branch information
iabyn committed Feb 26, 2018
1 parent 3a68ba9 commit a47e280
Show file tree
Hide file tree
Showing 5 changed files with 1,237 additions and 1,157 deletions.
Loading

0 comments on commit a47e280

Please sign in to comment.