Skip to content

Commit bd17841

Browse files
oderskynicolasstucki
authored andcommitted
Update docs to new syntax
1 parent 94e3a03 commit bd17841

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

docs/docs/reference/other-new-features/principled-meta-programming.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ quotation.
5252

5353
Quotes and splices can also be applied directly to identifiers. An identifier
5454
`$x` starting with a `$` that appears inside a quoted expression or type is treated as a
55-
splice `${x}`. Analogously, an identifier 'x will be treated in the future as a quote `'{x}`.
56-
See the Syntax section below for details.
55+
splice `${x}`. Analogously, an quoted identifier 'x that appears inside a splice
56+
is treated as a quote `'{x}`. See the Syntax section below for details.
5757

5858
Quotes and splices are duals of each other. For arbitrary
5959
expressions `e` and types `T` we have:
@@ -608,18 +608,15 @@ Compared to the [Dotty reference grammar](../../internals/syntax.md)
608608
there are the following syntax changes:
609609

610610
SimpleExpr ::= ...
611-
| ‘'’ BlockExpr
611+
| ‘'’ ‘{’ Block ‘}’
612612
| ‘'’ ‘[’ Type ‘]’
613-
| ‘$’ BlockExpr
613+
| ‘$’ ‘{’ Block ‘}’
614614
SimpleType ::= ...
615-
| ‘$’ BlockExpr
615+
| ‘$’ ‘{’ Block ‘}’
616616

617617
In addition, an identifier `$x` starting with a `$` that appears inside
618-
a quoted expression or type is treated as a splice `${x}`.
619-
620-
In the future, an analogous rule will apply to quoted identifiers. I.e. `'x`
621-
will expand everywhere to `'{x}`. However, we need to wait one language version with this
622-
so that the competing legacy syntax of symbol literals can be phased out safely.
618+
a quoted expression or type is treated as a splice `${x}` and a quoted identifier
619+
`'x` that appears inside a splice is treated as a quote `'{x}`
623620

624621
### Implementation in `dotc`
625622

0 commit comments

Comments
 (0)