Skip to content

Commit 7a05709

Browse files
authored
reword
1 parent 83f2ff5 commit 7a05709

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

doc/Language/traps.pod6

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,12 @@ Ways to match whitespace:
170170
171171
=head2 Ambiguities in Parsing
172172
173-
While some languages will let get away with removing as much whitespace
174-
as possible between tokens, Perl 6 is less forgiving. The overarching
173+
While some languages will let you get away with removing as much whitespace
174+
between tokens as possible, Perl 6 is less forgiving. The overarching
175175
mantra is we discourage code golf, so don't scrimp on whitespace (the
176176
more serious underlying reason behind these restrictions is
177177
single-pass parsing and ability to parse Perl 6 programs with virtually
178-
no L<backtracking|https://en.wikipedia.org/wiki/Backtracking>)).
178+
no L<backtracking|https://en.wikipedia.org/wiki/Backtracking>).
179179
180180
The common areas you should watch out for are:
181181
@@ -188,20 +188,20 @@ The common areas you should watch out for are:
188188
# RIGHT:
189189
while ($++ > 5) { .say }
190190
191-
# EVEN BETTER; Perl 6 does not require parentheses there
191+
# EVEN BETTER; Perl 6 does not require parentheses there:
192192
while $++ > 5 { .say }
193193
=end code
194194
195195
=head3 Reduction vs. Array constructor ambiguity
196196
197197
=begin code :skip-test
198-
# WRONG; ambiguity with `[<]` meta op
198+
# WRONG; ambiguity with `[<]` meta op:
199199
my @a = [[<foo>],];
200200
201-
# RIGHT; reductions cannot have spaces in them, so put one in
201+
# RIGHT; reductions cannot have spaces in them, so put one in:
202202
my @a = [[ <foo>],];
203203
204-
# No ambiguity here, natural spaces between items suffice to resolve it
204+
# No ambiguity here, natural spaces between items suffice to resolve it:
205205
my @a = [[<foo bar ber>],];
206206
=end code
207207
@@ -210,23 +210,23 @@ The common areas you should watch out for are:
210210
=begin code :skip-test
211211
my $foo = 'bar ber';
212212
213-
# WRONG; ambiguity whether `$foo»` means end of quoter or to hyper a postfix
213+
# WRONG; ambiguity whether `$foo»` means end of quoter or to hyper a postfix:
214214
my @a = «foo $foo»;
215215
216-
# RIGHT; put a space in to resolve ambiguity
216+
# RIGHT; put a space in to resolve ambiguity:
217217
my @a = «foo $foo »;
218218
219-
# Also good; use different delimiters
219+
# Also good; use different delimiters:
220220
my @a = qqww|foo $foo|;
221221
222222
223-
# WRONG; is it a hyper in the middle or end of quoters?
223+
# WRONG; is it a hyper in the middle or end of quoters?:
224224
my @a = «foo $foo».uc() Perl»;
225225
226-
# RIGHT; simply use Texas version of hyper
226+
# RIGHT; simply use Texas version of hyper:
227227
my @a = «foo $foo>>.uc() Perl»;
228228
229-
# Also good; use different delimiters
229+
# Also good; use different delimiters:
230230
my @a = qqww|foo $foo».uc() Perl|;
231231
=end code
232232

0 commit comments

Comments
 (0)