Skip to content

Commit 9149abe

Browse files
authored
Merge pull request #822 from milrope/patch-1
removed the word "Second" form the beginning of the 2nd list item and labelled it as `2`
2 parents d17153c + 30ccf09 commit 9149abe

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/macros-by-example.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,20 @@ compiler knows how to expand them properly:
171171
`=> { $( $( $i)* )* }`, and `=> { $( $i )+ }` are all illegal, but
172172
`=> { $( $i );* }` is correct and replaces a comma-separated list of
173173
identifiers with a semicolon-separated list.
174-
1. Second, each repetition in the transcriber must contain at least one
175-
metavariable to decide how many times to expand it. If multiple
176-
metavariables appear in the same repetition, they must be bound to the same
177-
number of fragments. For instance, `( $( $i:ident ),* ; $( $j:ident ),* ) =>
178-
( $( ($i,$j) ),*` must bind the same number of `$i` fragments as `$j`
179-
fragments. This means that invoking the macro with `(a, b, c; d, e, f`) is
180-
legal and expands to `((a,d), (b,e), (c,f))`, but `(a, b, c; d, e)` is
181-
illegal because it does not have the same number. This requirement applies
182-
to every layer of nested repetitions.
174+
2. Each repetition in the transcriber must contain at least one metavariable to
175+
decide how many times to expand it. If multiple metavariables appear in the
176+
same repetition, they must be bound to the same number of fragments. For
177+
instance, `( $( $i:ident ),* ; $( $j:ident ),* ) =>( $( ($i,$j) ),*` must
178+
bind the same number of `$i` fragments as `$j` fragments. This means that
179+
invoking the macro with `(a, b, c; d, e, f`) is legal and expands to
180+
`((a,d), (b,e), (c,f))`, but `(a, b, c; d, e)` is illegal because it does
181+
not have the same number. This requirement applies to every layer of nested
182+
repetitions.
183183

184184
## Scoping, Exporting, and Importing
185185

186-
For historical reasons, the scoping of macros by example does not work entirely like
187-
items. Macros have two forms of scope: textual scope, and path-based scope.
186+
For historical reasons, the scoping of macros by example does not work entirely
187+
like items. Macros have two forms of scope: textual scope, and path-based scope.
188188
Textual scope is based on the order that things appear in source files, or even
189189
across multiple files, and is the default scoping. It is explained further below.
190190
Path-based scope works exactly the same way that item scoping does. The scoping,

0 commit comments

Comments
 (0)