Skip to content

Commit 27fecb7

Browse files
committed
Simplify grammar
1 parent 7c38761 commit 27fecb7

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
@@ -1572,14 +1572,12 @@ object Parsers {
15721572
/** The block in a quote or splice */
15731573
def stagedBlock() = inBraces(block(simplify = true))
15741574

1575-
/** ExprSplice ::= ‘$’ id if inside quoted block
1576-
* | ‘$’ ‘{’ Block ‘}’ unless inside quoted pattern
1577-
* | ‘$’ ‘{’ Pattern ‘}’ when inside quoted pattern
1578-
*
1579-
* // Deprecated syntax
1580-
* TypeSplice ::= ‘$’ id if inside quoted type
1581-
* | ‘$’ ‘{’ Block ‘}’ unless inside quoted type pattern
1582-
* | ‘$’ ‘{’ Pattern ‘}’ when inside quoted type pattern
1575+
/** Splice ::= ‘$’ id if inside quoted block
1576+
* | ‘$’ ‘{’ Block ‘}’ unless inside quoted pattern
1577+
* | ‘$’ ‘{’ Pattern ‘}’ when inside quoted pattern
1578+
* | ‘$’ id if inside quoted type // Deprecated syntax
1579+
* | ‘$’ ‘{’ Block ‘}’ unless inside quoted type pattern // Deprecated syntax
1580+
* | ‘$’ ‘{’ Pattern ‘}’ when inside quoted type pattern // Deprecated syntax
15831581
*/
15841582
def splice(isType: Boolean): Tree =
15851583
val start = in.offset
@@ -1610,7 +1608,7 @@ object Parsers {
16101608
/** SimpleType ::= SimpleLiteral
16111609
* | ‘?’ SubtypeBounds
16121610
* | SimpleType1
1613-
* | SimpeType ‘(’ Singletons ‘)’ -- under language.experimental.dependent, checked in Typer
1611+
* | SimpleType ‘(’ Singletons ‘)’ -- under language.experimental.dependent, checked in Typer
16141612
* Singletons ::= Singleton {‘,’ Singleton}
16151613
*/
16161614
def simpleType(): Tree =
@@ -1648,7 +1646,7 @@ object Parsers {
16481646
* | Singleton `.' type
16491647
* | ‘(’ ArgTypes ‘)’
16501648
* | Refinement
1651-
* | TypeSplice
1649+
* | Splice
16521650
* | SimpleType1 TypeArgs
16531651
* | SimpleType1 `#' id
16541652
*/
@@ -2250,7 +2248,7 @@ object Parsers {
22502248
/** SimpleExpr ::= ‘new’ ConstrApp {`with` ConstrApp} [TemplateBody]
22512249
* | ‘new’ TemplateBody
22522250
* | BlockExpr
2253-
* | ExprSplice
2251+
* | Splice
22542252
* | Quoted
22552253
* | quoteId
22562254
* | SimpleExpr1 [`_`]

0 commit comments

Comments
 (0)