Skip to content

Commit b3b5009

Browse files
committed
clarify that expanded literals are unsuffixed
1 parent 843b9f8 commit b3b5009

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

text/0000-macro-metavar-expr.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ expansion like:
105105
${count(x)} $( $x )*
106106
```
107107

108-
the expression `${count(x)}` will expand to an integer literal equal to the
109-
number of times the `$( $x )*` repetition will repeat. For example, if
110-
the metavariable `$x` repeats four times then it will expand to the integer
111-
literal `4`.
108+
the expression `${count(x)}` will expand to an unsuffixed integer literal
109+
equal to the number of times the `$( $x )*` repetition will repeat. For
110+
example, if the metavariable `$x` repeats four times then it will expand to
111+
the integer literal `4`.
112112

113113
If repetitions are nested, then an optional depth parameter can be used to
114114
limit the number of nested repetitions that are counted. For example, a macro
@@ -128,7 +128,8 @@ of repetitions of `$x`.
128128
Within a repetition, the `${index()}` and `${length()}` metavariable
129129
expressions give the index of the current repetition and the length of the
130130
repetition (i.e., the number of times it will repeat). The index value ranges
131-
from `0` to `length - 1`, and the expanded values are integer literals.
131+
from `0` to `length - 1`, and the expanded values are unsuffixed integer
132+
literals so they are also suitable for tuple indexing.
132133

133134
For nested repetitions, the `${index()}` and `${length()}` metavariable
134135
expressions expand to the inner-most index and length respectively.

0 commit comments

Comments
 (0)