Skip to content

Commit f977dd5

Browse files
authored
Add more to Q-delim-as-identifier quirk
1 parent 269c47b commit f977dd5

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

doc/Language/quoting.pod6

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,21 @@ 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
26+
Some delimiters are not allowed immediately after C<Q>,
27+
C<q>, or C<qq>. Any characters that are allowed in
2828
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.
29+
are not allowed to be used, since in such a case, the quoting
30+
construct together with such characters are interpreted as
31+
an identifier. In addition, C<( )> is not allowed because that is
32+
interpreted as a function call. If you still wish to use
33+
those characters as delimiters, separate them from C<Q>,
34+
C<q>, or C<qq> with a space.
3235
3336
=for code :allow<B>
3437
B<Q'>this will not work!B<'>
3538
B<Q(>this won't work either!B<)>
36-
B<Q (>this is fineB<)>
39+
B<Q (>this is fine, because of space after QB<)>
40+
B<Q '>and so is thisB<'>
3741
3842
=for code :allow<B>
3943
Q<Make sure you B«<»matchB«>» opening and closing delimiters>

0 commit comments

Comments
 (0)