Skip to content

Commit 920c97f

Browse files
committed
Simplify grammar
1 parent 5d6901f commit 920c97f

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,14 +1570,12 @@ object Parsers {
15701570
/** The block in a quote or splice */
15711571
def stagedBlock() = inBraces(block(simplify = true))
15721572

1573-
/** ExprSplice ::= ‘$’ id if inside quoted block
1574-
* | ‘$’ ‘{’ Block ‘}’ unless inside quoted pattern
1575-
* | ‘$’ ‘{’ Pattern ‘}’ when inside quoted pattern
1576-
*
1577-
* // Deprecated syntax
1578-
* TypeSplice ::= ‘$’ id if inside quoted type
1579-
* | ‘$’ ‘{’ Block ‘}’ unless inside quoted type pattern
1580-
* | ‘$’ ‘{’ Pattern ‘}’ when inside quoted type pattern
1573+
/** Splice ::= ‘$’ id if inside quoted block
1574+
* | ‘$’ ‘{’ Block ‘}’ unless inside quoted pattern
1575+
* | ‘$’ ‘{’ Pattern ‘}’ when inside quoted pattern
1576+
* | ‘$’ id if inside quoted type // Deprecated syntax
1577+
* | ‘$’ ‘{’ Block ‘}’ unless inside quoted type pattern // Deprecated syntax
1578+
* | ‘$’ ‘{’ Pattern ‘}’ when inside quoted type pattern // Deprecated syntax
15811579
*/
15821580
def splice(isType: Boolean): Tree =
15831581
val start = in.offset
@@ -1608,7 +1606,7 @@ object Parsers {
16081606
/** SimpleType ::= SimpleLiteral
16091607
* | ‘?’ SubtypeBounds
16101608
* | SimpleType1
1611-
* | SimpeType ‘(’ Singletons ‘)’ -- under language.experimental.dependent, checked in Typer
1609+
* | SimpleType ‘(’ Singletons ‘)’ -- under language.experimental.dependent, checked in Typer
16121610
* Singletons ::= Singleton {‘,’ Singleton}
16131611
*/
16141612
def simpleType(): Tree =
@@ -1646,7 +1644,7 @@ object Parsers {
16461644
* | Singleton `.' type
16471645
* | ‘(’ ArgTypes ‘)’
16481646
* | Refinement
1649-
* | TypeSplice
1647+
* | Splice
16501648
* | SimpleType1 TypeArgs
16511649
* | SimpleType1 `#' id
16521650
*/
@@ -2248,7 +2246,7 @@ object Parsers {
22482246
/** SimpleExpr ::= ‘new’ ConstrApp {`with` ConstrApp} [TemplateBody]
22492247
* | ‘new’ TemplateBody
22502248
* | BlockExpr
2251-
* | ExprSplice
2249+
* | Splice
22522250
* | Quoted
22532251
* | quoteId
22542252
* | SimpleExpr1 [`_`]

0 commit comments

Comments
 (0)