Skip to content

Commit 269c47b

Browse files
authored
Merge pull request #1038 from samcv/signal
Document that identifiers like `'` and `-` can't be used after Q q, or qq quoting constructs
2 parents cabe811 + 65833a3 commit 269c47b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/Language/quoting.pod6

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ Delimiters can be nested, but in the plain C<Q> form, backslash escapes
2323
aren't allowed. In other words, basic C<Q> strings are as literal as
2424
possible.
2525
26+
Some delimiters are not allowed immediately after C<Q>',
27+
C<q> or C<qq>. Any characters that are allowed in
28+
L<identifiers|language/syntax#Identifiers>
29+
are not allowed to be used. For example, C<'> and C<->.
30+
In addition, C<( )> is not allowed because that looks
31+
like a function call.
32+
33+
=for code :allow<B>
34+
B<Q'>this will not work!B<'>
35+
B<Q(>this won't work either!B<)>
36+
B<Q (>this is fineB<)>
37+
2638
=for code :allow<B>
2739
Q<Make sure you B«<»matchB«>» opening and closing delimiters>
2840
Q{This is still a closing curly brace → B<\>}

0 commit comments

Comments
 (0)