Skip to content

Commit ead98e2

Browse files
committed
Add "infix stopper" to glossary
Inspired by rakudo/rakudo#2115
1 parent 8c67799 commit ead98e2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/Language/glossary.pod6

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,14 @@ the L<C<use> keyword|/language/modules#use>.
366366
367367
Include functions from a module in the current namespace.
368368
369+
=head1 X<infix stopper|Reference,infix>
370+
371+
An I<infix stopper> is something that tells us the grammar not try to parse
372+
an infix at that point. Consider say C<"abc42def" ~~ m|\d+|>. Ordinarily,
373+
a C<|> in a regex is treated as an alternation, but since the infix stopper
374+
matches the current regex terminator, we don't continue and try to parse an
375+
infix at that point. The C<|> is thus treated as the end of the regex.
376+
369377
=head1 X<Instance|Reference,instance>
370378
371379
An I<instance> of a class is also called an I<object> in some other

0 commit comments

Comments
 (0)