Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Begin documenting Q
  • Loading branch information
Mouq committed Apr 21, 2014
1 parent 8fe2c15 commit f6fc962
Showing 1 changed file with 50 additions and 2 deletions.
52 changes: 50 additions & 2 deletions lib/terms.pod
Expand Up @@ -42,11 +42,23 @@ L<Num> with value C<3 * 10**8>.
=head2 Str
see the section on quoting constructs below.
'a string'
'I\'m escaped!'
"I don't need to be"
"\"But I still can be,\" he said."
q|Other delimters can be used too!|
String literals are most often created with C<'> or C<">, but strings
are actually a powerful sub-language of Perl 6. See the section on
quoting constructs below.
=head2 Regex
see the section on quoting constructs below.
/ match some text /
rx/slurp \s rest (.*) $/
These forms produce regex literals. See the section on quoting
constructs below as well as L<the documentation on regexes|regexes>.
=head2 Pair
Expand Down Expand Up @@ -91,8 +103,44 @@ list, or several quoting constructs
=head1 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.
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.
Q<Make sure you <match> opening and closing delimiters>
Q{This is still a closing brace → \}
=head3 Backslashes: :q
TODO
=head3 Interpolation: :qq
TODO
=head3 Word quoting: :qw
TODO
=head3 Shell quoting: :qqw
TODO
=head3 Heredocs: :to
TODO
=head2 Regexes
TODO -- or just point to regexes.pod?
=head1 Identifier terms
There are built-in identifier terms in Perl 6, which are listed below.
Expand Down

0 comments on commit f6fc962

Please sign in to comment.