Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adds Boolean literals, closes #2552
  • Loading branch information
JJ committed Jan 12, 2019
1 parent 18b3e10 commit 8a7b0a0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion doc/Language/syntax.pod6
Expand Up @@ -553,7 +553,7 @@ is a representation of a constant value in source code. Perl 6 has literals
for several built-in types, like L<strings|/type/Str>, several numeric types,
L<pairs|/type/Pair> and more.
X<|String (literals)>
=head3 String literals
String literals are surrounded by quotes:
Expand All @@ -573,6 +573,7 @@ X<|0b (radix form)>
X<|0d (radix form)>
X<|0o (radix form)>
X<|0x (radix form)>
X<|Number (literals)>
=head3 Number literals
Number literals are generally specified in base ten, unless a prefix
Expand Down Expand Up @@ -646,6 +647,7 @@ a real and an imaginary number:
6.123e5i # note that this is 6.123e5 * i, not 6.123 * 10 ** (5i)
=end code
X<|Pairs (literals)>
=head3 Pair literals
L<Pairs|/type/Pair> are made of a key and a value, and there are two
Expand Down Expand Up @@ -697,6 +699,12 @@ Long forms with explicit values:
:thing{a => 'b'} # same as thing => { a => 'b' }
=end code
X<|Boolean (literals)>
=head3 Boolean literals
C<True> and C<False> are Boolean literals; they will always have initial capital
letter.
=head3 Array literals
A pair of square brackets can surround an expression to form an itemized
Expand Down

0 comments on commit 8a7b0a0

Please sign in to comment.