Skip to content

Commit

Permalink
RakuAST: fix empty =begin foo␤=end foo
Browse files Browse the repository at this point in the history
The problem was caused by the = on the next line already having
been eaten by doc-configuration.
  • Loading branch information
lizmat committed Apr 30, 2023
1 parent 38cdaf3 commit e253ce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Raku/Actions.nqp
Expand Up @@ -2738,7 +2738,7 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions {

method doc-block:sym<begin>($/) {
if $*FROM-SEEN{$/.from}++ {
return
return;
}
my $SEEN := $*SEEN;

Expand Down Expand Up @@ -2766,7 +2766,7 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions {

method doc-block:sym<for>($/) {
if $*FROM-SEEN{$/.from}++ {
return
return;
}

my $config := extract-config($/);
Expand All @@ -2783,7 +2783,7 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions {

method doc-block:sym<abbreviated>($/) {
if $*FROM-SEEN{$/.from}++ {
return
return;
}

my $config := extract-config($/);
Expand Down
4 changes: 2 additions & 2 deletions src/Raku/Grammar.nqp
Expand Up @@ -3594,7 +3594,7 @@ if $*COMPILING_CORE_SETTING {
$<type>=<.doc-identifier>
# fetch any configuration
<doc-configuration($<spaces>)>
<doc-configuration($<spaces>)>*
# should now be at end of line
<.doc-newline>+
Expand Down Expand Up @@ -3685,7 +3685,7 @@ if $*COMPILING_CORE_SETTING {
}
token doc-configuration($spaces = '') {
[\n $spaces '=']? [\h+ <doc-colonpair>]*
[\n $spaces '=' \h+]? <doc-colonpair> [\h+ <doc-colonpair>]*
}
token doc-newline { \h* \n }
Expand Down

0 comments on commit e253ce4

Please sign in to comment.