@@ -504,7 +504,7 @@ object Parsers {
504
504
def selector (t : Tree ): Tree =
505
505
atPos(startOffset(t), in.offset) { Select (t, ident()) }
506
506
507
- /** Selectors ::= ident { `.' ident()
507
+ /** Selectors ::= id { `.' id }
508
508
*
509
509
* Accept `.' separated identifiers acting as a selectors on given tree `t`.
510
510
* @param finish An alternative parse in case the next token is not an identifier.
@@ -515,7 +515,7 @@ object Parsers {
515
515
if (t1 ne t) t1 else dotSelectors(selector(t), finish)
516
516
}
517
517
518
- /** DotSelectors ::= { `.' ident()
518
+ /** DotSelectors ::= { `.' id }
519
519
*
520
520
* Accept `.' separated identifiers acting as a selectors on given tree `t`.
521
521
* @param finish An alternative parse in case the token following a `.' is not an identifier.
@@ -528,9 +528,9 @@ object Parsers {
528
528
private val id : Tree => Tree = x => x
529
529
530
530
/** Path ::= StableId
531
- * | [Ident `.'] this
531
+ * | [id `.'] this
532
532
*
533
- * @param thisOK If true, [Ident `.'] this is acceptable as the path .
533
+ * @param thisOK If true, the path can end with the keyword `this` .
534
534
* If false, another selection is required after the `this`.
535
535
* @param finish An alternative parse in case the token following a `.' is not an identifier.
536
536
* If the alternative does not apply, its tree argument is returned unchanged.
@@ -565,20 +565,20 @@ object Parsers {
565
565
}
566
566
}
567
567
568
- /** MixinQualifier ::= `[' Id `]'
568
+ /** MixinQualifier ::= `[' id `]'
569
569
*/
570
570
def mixinQualifierOpt (): Ident =
571
571
if (in.token == LBRACKET ) inBrackets(atPos(in.offset) { typeIdent() })
572
572
else EmptyTypeIdent
573
573
574
- /** StableId ::= Id
575
- * | Path `.' Id
574
+ /** StableId ::= id
575
+ * | Path `.' id
576
576
* | [id '.'] super [`[' id `]']`.' id
577
577
*/
578
578
def stableId (): Tree =
579
579
path(thisOK = false )
580
580
581
- /** QualId ::= Id {`.' Id }
581
+ /** QualId ::= id {`.' id }
582
582
*/
583
583
def qualId (): Tree =
584
584
dotSelectors(termIdent())
@@ -773,7 +773,7 @@ object Parsers {
773
773
else t
774
774
775
775
/** SimpleType ::= SimpleType TypeArgs
776
- * | SimpleType `#' Id
776
+ * | SimpleType `#' id
777
777
* | StableId
778
778
* | Path `.' type
779
779
* | `(' ArgTypes `)'
@@ -955,7 +955,7 @@ object Parsers {
955
955
/** Expr ::= [`implicit'] FunParams `=>' Expr
956
956
* | Expr1
957
957
* FunParams ::= Bindings
958
- * | Id
958
+ * | id
959
959
* | `_'
960
960
* ExprInParens ::= PostfixExpr `:' Type
961
961
* | Expr
@@ -971,12 +971,12 @@ object Parsers {
971
971
* | `throw' Expr
972
972
* | `return' [Expr]
973
973
* | ForExpr
974
- * | [SimpleExpr `.'] Id `=' Expr
974
+ * | [SimpleExpr `.'] id `=' Expr
975
975
* | SimpleExpr1 ArgumentExprs `=' Expr
976
976
* | PostfixExpr [Ascription]
977
977
* | PostfixExpr `match' `{' CaseClauses `}'
978
978
* Bindings ::= `(' [Binding {`,' Binding}] `)'
979
- * Binding ::= (Id | `_') [`:' Type]
979
+ * Binding ::= (id | `_') [`:' Type]
980
980
* Ascription ::= `:' CompoundType
981
981
* | `:' Annotation {Annotation}
982
982
* | `:' `_' `*'
@@ -1120,7 +1120,7 @@ object Parsers {
1120
1120
}
1121
1121
1122
1122
/** FunParams ::= Bindings
1123
- * | Id
1123
+ * | id
1124
1124
* | `_'
1125
1125
* Bindings ::= `(' [Binding {`,' Binding}] `)'
1126
1126
*/
@@ -1149,7 +1149,7 @@ object Parsers {
1149
1149
(atPos(start) { makeParameter(name, t, mods) }) :: Nil
1150
1150
}
1151
1151
1152
- /** Binding ::= (Id | `_') [`:' Type]
1152
+ /** Binding ::= (id | `_') [`:' Type]
1153
1153
*/
1154
1154
def binding (mods : Modifiers ): Tree =
1155
1155
atPos(in.offset) { makeParameter(bindingName(), typedOpt(), mods) }
@@ -1161,8 +1161,8 @@ object Parsers {
1161
1161
}
1162
1162
else ident()
1163
1163
1164
- /** Expr ::= implicit Id `=>' Expr
1165
- * BlockResult ::= implicit Id [`:' InfixType] `=>' Block // Scala2 only
1164
+ /** Expr ::= implicit id `=>' Expr
1165
+ * BlockResult ::= implicit id [`:' InfixType] `=>' Block // Scala2 only
1166
1166
*/
1167
1167
def implicitClosure (start : Int , location : Location .Value , implicitMods : Modifiers ): Tree =
1168
1168
closureRest(start, location, funParams(implicitMods, location))
@@ -1173,9 +1173,9 @@ object Parsers {
1173
1173
Function (params, if (location == Location .InBlock ) block() else expr())
1174
1174
}
1175
1175
1176
- /** PostfixExpr ::= InfixExpr [Id [nl]]
1176
+ /** PostfixExpr ::= InfixExpr [id [nl]]
1177
1177
* InfixExpr ::= PrefixExpr
1178
- * | InfixExpr Id [nl] InfixExpr
1178
+ * | InfixExpr id [nl] InfixExpr
1179
1179
*/
1180
1180
def postfixExpr (): Tree =
1181
1181
infixOps(prefixExpr(), canStartExpressionTokens, prefixExpr, maybePostfix = true )
@@ -1200,7 +1200,7 @@ object Parsers {
1200
1200
* | xmlLiteral
1201
1201
* | Path
1202
1202
* | `(' [ExprsInParens] `)'
1203
- * | SimpleExpr `.' Id
1203
+ * | SimpleExpr `.' id
1204
1204
* | SimpleExpr (TypeArgs | NamedTypeArgs)
1205
1205
* | SimpleExpr1 ArgumentExprs
1206
1206
*/
@@ -1452,7 +1452,7 @@ object Parsers {
1452
1452
p
1453
1453
}
1454
1454
1455
- /** InfixPattern ::= SimplePattern {Id [nl] SimplePattern}
1455
+ /** InfixPattern ::= SimplePattern {id [nl] SimplePattern}
1456
1456
*/
1457
1457
def infixPattern (): Tree =
1458
1458
infixOps(simplePattern(), canStartExpressionTokens, simplePattern, notAnOperator = nme.raw.BAR )
@@ -1464,8 +1464,8 @@ object Parsers {
1464
1464
* | SimplePattern1 [TypeArgs] [ArgumentPatterns]
1465
1465
* SimplePattern1 ::= Path
1466
1466
* | `{' Block `}'
1467
- * | SimplePattern1 `.' Id
1468
- * PatVar ::= Id
1467
+ * | SimplePattern1 `.' id
1468
+ * PatVar ::= id
1469
1469
* | `_'
1470
1470
*/
1471
1471
val simplePattern = () => in.token match {
@@ -1582,7 +1582,7 @@ object Parsers {
1582
1582
def addMod (mods : Modifiers , mod : Mod ): Modifiers =
1583
1583
addFlag(mods, mod.flags).withAddedMod(mod)
1584
1584
1585
- /** AccessQualifier ::= "[" (Id | this) "]"
1585
+ /** AccessQualifier ::= "[" (id | this) "]"
1586
1586
*/
1587
1587
def accessQualifierOpt (mods : Modifiers ): Modifiers =
1588
1588
if (in.token == LBRACKET ) {
@@ -1661,16 +1661,16 @@ object Parsers {
1661
1661
1662
1662
/** ClsTypeParamClause::= `[' ClsTypeParam {`,' ClsTypeParam} `]'
1663
1663
* ClsTypeParam ::= {Annotation} [{Modifier} type] [`+' | `-']
1664
- * Id [HkTypeParamClause] TypeParamBounds
1664
+ * id [HkTypeParamClause] TypeParamBounds
1665
1665
*
1666
1666
* DefTypeParamClause::= `[' DefTypeParam {`,' DefTypeParam} `]'
1667
- * DefTypeParam ::= {Annotation} Id [HkTypeParamClause] TypeParamBounds
1667
+ * DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds
1668
1668
*
1669
1669
* TypTypeParamCaluse::= `[' TypTypeParam {`,' TypTypeParam} `]'
1670
- * TypTypeParam ::= {Annotation} Id [HkTypePamClause] TypeBounds
1670
+ * TypTypeParam ::= {Annotation} id [HkTypePamClause] TypeBounds
1671
1671
*
1672
1672
* HkTypeParamClause ::= `[' HkTypeParam {`,' HkTypeParam} `]'
1673
- * HkTypeParam ::= {Annotation} ['+' | `-'] (Id [HkTypePamClause] | _') TypeBounds
1673
+ * HkTypeParam ::= {Annotation} ['+' | `-'] (id [HkTypePamClause] | _') TypeBounds
1674
1674
*/
1675
1675
def typeParamClause (ownerKind : ParamOwner .Value ): List [TypeDef ] = inBrackets {
1676
1676
def typeParam (): TypeDef = {
@@ -1825,7 +1825,7 @@ object Parsers {
1825
1825
}
1826
1826
}
1827
1827
1828
- /** ImportExpr ::= StableId `.' (Id | `_' | ImportSelectors)
1828
+ /** ImportExpr ::= StableId `.' (id | `_' | ImportSelectors)
1829
1829
*/
1830
1830
val importExpr = () => path(thisOK = false , handleImport) match {
1831
1831
case imp : Import =>
@@ -1859,7 +1859,7 @@ object Parsers {
1859
1859
}
1860
1860
}
1861
1861
1862
- /** ImportSelector ::= Id [`=>' Id | `=>' `_']
1862
+ /** ImportSelector ::= id [`=>' id | `=>' `_']
1863
1863
*/
1864
1864
def importSelector (): Tree = {
1865
1865
val from = termIdentOrWildcard()
@@ -1904,9 +1904,9 @@ object Parsers {
1904
1904
}
1905
1905
1906
1906
/** PatDef ::= Pattern2 {`,' Pattern2} [`:' Type] `=' Expr
1907
- * VarDef ::= PatDef | Id {`,' Id } `:' Type `=' `_'
1908
- * ValDcl ::= Id {`,' Id } `:' Type
1909
- * VarDcl ::= Id {`,' Id } `:' Type
1907
+ * VarDef ::= PatDef | id {`,' id } `:' Type `=' `_'
1908
+ * ValDcl ::= id {`,' id } `:' Type
1909
+ * VarDcl ::= id {`,' id } `:' Type
1910
1910
*/
1911
1911
def patDefOrDcl (start : Offset , mods : Modifiers , docstring : Option [Comment ] = None ): Tree = atPos(start, nameStart) {
1912
1912
val lhs = commaSeparated(pattern2)
@@ -2008,8 +2008,8 @@ object Parsers {
2008
2008
Block (stats, Literal (Constant (())))
2009
2009
}
2010
2010
2011
- /** TypeDef ::= type Id [TypeParamClause] `=' Type
2012
- * TypeDcl ::= type Id [TypeParamClause] TypeBounds
2011
+ /** TypeDef ::= type id [TypeParamClause] `=' Type
2012
+ * TypeDcl ::= type id [TypeParamClause] TypeBounds
2013
2013
*/
2014
2014
def typeDefOrDcl (start : Offset , mods : Modifiers , docstring : Option [Comment ] = None ): Tree = {
2015
2015
newLinesOpt()
@@ -2051,7 +2051,7 @@ object Parsers {
2051
2051
}
2052
2052
}
2053
2053
2054
- /** ClassDef ::= Id [ClsTypeParamClause]
2054
+ /** ClassDef ::= id [ClsTypeParamClause]
2055
2055
* [ConstrMods] ClsParamClauses TemplateOpt
2056
2056
*/
2057
2057
def classDef (start : Offset , mods : Modifiers , docstring : Option [Comment ]): TypeDef = atPos(start, nameStart) {
@@ -2079,7 +2079,7 @@ object Parsers {
2079
2079
mods
2080
2080
}
2081
2081
2082
- /** ObjectDef ::= Id TemplateOpt
2082
+ /** ObjectDef ::= id TemplateOpt
2083
2083
*/
2084
2084
def objectDef (start : Offset , mods : Modifiers , docstring : Option [Comment ] = None ): ModuleDef = atPos(start, nameStart) {
2085
2085
val name = ident()
0 commit comments