Skip to content

Commit

Permalink
Make $*PRECEDING_DECL lexically scoped for signature
Browse files Browse the repository at this point in the history
Because signature is a local scope from documentation point of view.

Fixes documenting of parametric role:

    role R[::T] {
        #= this now belongs to the role, not to the parameter T
    }

And makes one spec TODO passing.
  • Loading branch information
vrurg committed Jan 6, 2022
1 parent d3e7442 commit 8f989d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Perl6/Grammar.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -2644,6 +2644,8 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
:my $*zone := 'posreq';
:my $*multi_invocant := 1;
:my @*seps := nqp::list();
:my $*PRECEDING_DECL; # for #= comments
:my $*PRECEDING_DECL_LINE := -1; # XXX update this when I see another comment like it?
<.ws>
[
| <?before '-->' | ')' | ']' | '{' | ':'\s | ';;' >
Expand Down

0 comments on commit 8f989d1

Please sign in to comment.