Skip to content

Commit 4682787

Browse files
committed
Some reflow and un-capitalization
1 parent 534afbc commit 4682787

File tree

1 file changed

+38
-35
lines changed

1 file changed

+38
-35
lines changed

doc/Language/syntax.pod6

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ though you can't leave out any of the remaining whitespace.
6262
=head2 X<Unspace|syntax,\>
6363
X<|syntax,Unspace>
6464
65-
In many places where the compiler would not allow a space you can use any
66-
whitespace that is quoted with a backslash. Unspaces in tokens are not
67-
supported. Newlines that are unspaced still count when the compiler produces
68-
line numbers. Use cases for unspace are separation of postfix operators and
69-
routine argument lists.
65+
In many places where the compiler would not allow a space you can use
66+
any whitespace that is quoted with a backslash. Unspaces in tokens are
67+
not supported. Newlines that are unspaced still count when the compiler
68+
produces line numbers. Use cases for unspace are separation of postfix
69+
operators and routine argument lists.
7070
7171
sub alignment(+@l) { +@l };
7272
sub long-name-alignment(+@l) { +@l };
7373
alignment\ (1,2,3,4).say;
7474
long-name-alignment(3,5)\ .say;
7575
say Inf+Inf\i;
7676
77-
=head2 Separating Statements with Semicolons
77+
=head2 Separating statements with semicolons
7878
7979
A Perl 6 program is a list of statements, separated by semicolons C<;>.
8080
@@ -83,8 +83,8 @@ say "Hello";
8383
say "world";
8484
=end code
8585
86-
A semicolon after the final statement (or after the final statement inside a
87-
block) is optional.
86+
A semicolon after the final statement (or after the final statement
87+
inside a block) is optional.
8888
8989
=begin code
9090
say "Hello";
@@ -98,39 +98,39 @@ if True {
9898
say "world"
9999
=end code
100100
101-
=head2 Implied Separator Rule (for statements ending in blocks)
101+
=head2 Implied separator rule (for statements ending in blocks)
102102
103-
Complete statements ending in bare blocks can omit the trailing semicolon, if no
104-
additional statements on the same line follow the block's closing curly
105-
brace C<}>. This is called the "implied separator rule". For example, you
106-
don't need to write a semicolon after an C<if> statement block as seen above, and
107-
below.
103+
Complete statements ending in bare blocks can omit the trailing
104+
semicolon, if no additional statements on the same line follow the
105+
block's closing curly brace C<}>. This is called the "implied separator
106+
rule". For example, you don't need to write a semicolon after an C<if>
107+
statement block as seen above, and below.
108108
109109
=begin code
110110
if True { say "Hello" }
111111
say "world";
112112
=end code
113113
114-
However, semicolons are required to separate a block from trailing statements in
115-
the same line.
114+
However, semicolons are required to separate a block from trailing
115+
statements in the same line.
116116
117117
=begin code
118118
if True { say "Hello" }; say "world";
119119
# ^^^ this ; is required
120120
=end code
121121
122-
This implied statement separator rule applies in other ways, besides control
123-
statements, that could end with a bare block. For example, in combination with
124-
the colon C<:> syntax for method calls.
122+
This implied statement separator rule applies in other ways, besides
123+
control statements, that could end with a bare block. For example, in
124+
combination with the colon C<:> syntax for method calls.
125125
126126
=begin code
127127
my @names = <Foo Bar Baz>;
128128
my @upper-case-names = @names.map: { .uc } # OUTPUT: [FOO BAR BAZ]
129129
=end code
130130
131-
For a series of blocks that are part of the same C<if>/C<elsif>/C<else> (or similar)
132-
construct, the implied separator rule only applies at the end of the last block of that series.
133-
These three are equivalent:
131+
For a series of blocks that are part of the same C<if>/C<elsif>/C<else>
132+
(or similar) construct, the implied separator rule only applies at the
133+
end of the last block of that series. These three are equivalent:
134134
135135
=begin code
136136
if True { say "Hello" } else { say "Goodbye" }; say "world";
@@ -193,9 +193,11 @@ say "No more";
193193
=end code
194194
195195
Brackets inside the comment can be nested, so in C<#`{ a { b } c }>, the
196-
comment goes until the very end of the string. You may also use more complex
197-
brackets, such as C<#`{{ double-curly-brace }}>, which might help disambiguate
198-
from nested brackets. You can embed these comments in expressions, as long as you don't insert them in the middle of keywords or identifiers.
196+
comment goes until the very end of the string. You may also use more
197+
complex brackets, such as C<#`{{ double-curly-brace }}>, which might
198+
help disambiguate from nested brackets. You can embed these comments in
199+
expressions, as long as you don't insert them in the middle of keywords
200+
or identifiers.
199201
200202
=head3 Pod comments
201203
@@ -372,18 +374,19 @@ variables:
372374
373375
=head2 Packages and Qualified Names
374376
375-
Named entities, such as variables, constants, classes, modules, subs, etc, are
376-
part of a namespace. Nested parts of a name use C<::> to separate the
377-
hierarchy. Some examples:
377+
Named entities, such as variables, constants, classes, modules or subs,
378+
are part of a namespace. Nested parts of a name use C<::> to separate
379+
the hierarchy. Some examples:
378380
379-
=begin code :skip-test
380-
$foo # simple identifiers
381-
$Foo::Bar::baz # compound identifiers separated by ::
382-
$Foo::($bar)::baz # compound identifiers that perform interpolations
383-
Foo::Bar::bob(23) # function invocation given qualified name
384-
=end code
381+
=begin code :skip-test
382+
$foo # simple identifiers
383+
$Foo::Bar::baz # compound identifiers separated by ::
384+
$Foo::($bar)::baz # compound identifiers that perform interpolations
385+
Foo::Bar::bob(23) # function invocation given qualified name
386+
=end code
385387
386-
See the L<documentation on packages|/language/packages> for more details.
388+
See the L<documentation on packages|/language/packages> for more
389+
details.
387390
388391
389392
=head2 Literals

0 commit comments

Comments
 (0)