Skip to content

Commit fb506f2

Browse files
committed
Add description of alternative syntax options
1 parent 7ef6540 commit fb506f2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

text/0000-macro-metavar-expr.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,15 @@ counted inwards from the outer-most nesting. This was changed to count
302302
outwards from the inner-most nesting so that expressions can be copied
303303
to a different nesting depth without needing to change them.
304304

305+
This RFC proposes using `${ ... }` as the delimiter for metavariable
306+
expressions. Available alternatives are:
307+
* `$[ ... ]`, e.g.: `$[count(value)]`
308+
* `$:`, e.g. `$:count(value)`
309+
* `$@`, e.g. `$@count(value)`
310+
* `$!`, e.g. `$!count(value)`
311+
* Another sigil, although `#` should be avoided to avoid clashes with the
312+
`quote!` macro.
313+
305314
# Prior art
306315
[prior-art]: #prior-art
307316

@@ -345,4 +354,5 @@ expander to produce.
345354

346355
The syntax `$[...]` is still invalid, and so remains available for any other
347356
extensions which may come in the future and don't fit in with metavariable
348-
expression syntax.
357+
expression syntax. Additionally, any symbol after `$` is also invalid, so
358+
other sequences, such as `$@`, are available.

0 commit comments

Comments
 (0)