Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Begin describing Q:q
  • Loading branch information
Mouq committed Apr 21, 2014
1 parent f6fc962 commit 5d54887
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions lib/terms.pod
Expand Up @@ -105,21 +105,36 @@ list, or several quoting constructs
=head2 The Q Lang
Quoting constructs make up a sub-language of Perl 6, which are based of
the simplest form, usable via the shortcut C<「…」>, or via C<Q> and any pair of delimiters.
Quoting constructs make up a sub-language of Perl 6, which are based on
C<Q>, the simplest form, usable via the shortcut C<「…」>, or via C<Q>
followed by any pair of delimiters surrounding your text.
Q[A literal string]
「More plainly.」
Q ^Almost any non-word character can be a delimiter!^
Delimiters can nested, but in the plain C<Q> form, backslash escapes aren't allowed.
Delimiters can nested, but in the plain C<Q> form, backslash escapes
aren't allowed. In other words, basic C<Q> strings are as literal as
possible.
Q<Make sure you <match> opening and closing delimiters>
Q{This is still a closing brace → \}
=head3 Backslashes: :q
The other quote forms add on to this basic functionality:
TODO
=head3 Escaping: :q
'Very plain'
q[This back\slash stays]
q[This back\\slash stays] # Identical output
Q :q $ There're no backslashes here, only lots of \$\$\$! $
'(Just kidding. There\'s no money in that string)'
The C<:q> form allows for escaping characters that would otherwise end
the string using a backslash. The backslash itself can be escaped, too,
as in the third example above. The usual form is C<'…'> or C<q> followed
by a delimiter, but it's also available as an adverb on C<Q>, as in the
fourth example above.
=head3 Interpolation: :qq
Expand Down

0 comments on commit 5d54887

Please sign in to comment.