@@ -77,7 +77,9 @@ escape ::= ‘$$’
77
77
| ‘{’ Block [‘;’ whiteSpace stringFormat whiteSpace] ‘}’
78
78
stringFormat ::= {printableChar \ (‘"’ | ‘}’ | ‘ ’ | ‘\t’ | ‘\n’)}
79
79
80
- symbolLiteral ::= ‘'’ plainid
80
+ symbolLiteral ::= ‘'’ plainid // until 2.13
81
+ quoteId ::= ‘'’ plainid // from 3.1
82
+ spliceId ::= '$' plainid
81
83
82
84
comment ::= ‘/*’ “any sequence of characters; nested comments are allowed” ‘*/’
83
85
| ‘//’ “any sequence of characters up to end of line”
@@ -158,7 +160,8 @@ SimpleType ::= SimpleType TypeArgs
158
160
| ‘_’ SubtypeBounds
159
161
| Refinement RefinedTypeTree(EmptyTree, refinement)
160
162
| SimpleLiteral SingletonTypeTree(l)
161
- | ‘$’ (id | ‘{’ Block ‘}’)
163
+ | spliceId // only inside quotes
164
+ | ‘$’ ‘{’ Block ‘}’
162
165
ArgTypes ::= Type {‘,’ Type}
163
166
| NamedTypeArg {‘,’ NamedTypeArg}
164
167
FunArgType ::= Type
@@ -208,9 +211,11 @@ InfixExpr ::= PrefixExpr
208
211
PrefixExpr ::= [‘-’ | ‘+’ | ‘~’ | ‘!’] SimpleExpr PrefixOp(expr, op)
209
212
SimpleExpr ::= ‘new’ (ConstrApp [TemplateBody] | TemplateBody) New(constr | templ)
210
213
| BlockExpr
211
- | ‘'’ (id | ‘{’ Block ‘}’)
214
+ | ‘'’ ‘{’ Block ‘}’
212
215
| ‘'’ ‘[’ Type ‘]’
213
- | ‘$’ (id | ‘{’ Block ‘}’)
216
+ | ‘$’ ‘{’ Block ‘}’
217
+ | spliceId // only inside quotes
218
+ | quoteId // only inside splices
214
219
| SimpleExpr1 [‘_’] PostfixOp(expr, _)
215
220
SimpleExpr1 ::= Literal
216
221
| Path
0 commit comments