Skip to content

Commit 5621797

Browse files
committed
doc unspace
1 parent 010af75 commit 5621797

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

doc/Language/syntax.pod6

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,19 @@ if True {say "Hello"}
5656
5757
though you can't leave out any of the remaining whitespace.
5858
59+
=head2 Unspace
60+
61+
In many places where the compiler would not allow a space you can use any
62+
whitespace that is quoted with a backslash. Unspaces in tokens are not
63+
supported. Newlines that are unspaced still count when the compiler produces
64+
line numbers. Usecases for unspace are separation of postfix operators and
65+
routine argument lists.
66+
67+
sub alignment(+@l) { +@l };$
68+
sub long-name-alignment(+@l) { +@l };$
69+
alignment\ (1,2,3,4)>>.say;$
70+
long-name-alignment(3,5)\ >>.say;$
71+
5972
=head2 Separating Statements
6073
6174
A Perl 6 program is a list of statements, separated by semicolons C<;>.

0 commit comments

Comments
 (0)