@@ -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 `)'
@@ -959,7 +959,7 @@ object Parsers {
959
959
/** Expr ::= [`implicit'] FunParams `=>' Expr
960
960
* | Expr1
961
961
* FunParams ::= Bindings
962
- * | Id
962
+ * | id
963
963
* | `_'
964
964
* ExprInParens ::= PostfixExpr `:' Type
965
965
* | Expr
@@ -975,12 +975,12 @@ object Parsers {
975
975
* | `throw' Expr
976
976
* | `return' [Expr]
977
977
* | ForExpr
978
- * | [SimpleExpr `.'] Id `=' Expr
978
+ * | [SimpleExpr `.'] id `=' Expr
979
979
* | SimpleExpr1 ArgumentExprs `=' Expr
980
980
* | PostfixExpr [Ascription]
981
981
* | PostfixExpr `match' `{' CaseClauses `}'
982
982
* Bindings ::= `(' [Binding {`,' Binding}] `)'
983
- * Binding ::= (Id | `_') [`:' Type]
983
+ * Binding ::= (id | `_') [`:' Type]
984
984
* Ascription ::= `:' CompoundType
985
985
* | `:' Annotation {Annotation}
986
986
* | `:' `_' `*'
@@ -1124,7 +1124,7 @@ object Parsers {
1124
1124
}
1125
1125
1126
1126
/** FunParams ::= Bindings
1127
- * | Id
1127
+ * | id
1128
1128
* | `_'
1129
1129
* Bindings ::= `(' [Binding {`,' Binding}] `)'
1130
1130
*/
@@ -1153,7 +1153,7 @@ object Parsers {
1153
1153
(atPos(start) { makeParameter(name, t, mods) }) :: Nil
1154
1154
}
1155
1155
1156
- /** Binding ::= (Id | `_') [`:' Type]
1156
+ /** Binding ::= (id | `_') [`:' Type]
1157
1157
*/
1158
1158
def binding (mods : Modifiers ): Tree =
1159
1159
atPos(in.offset) { makeParameter(bindingName(), typedOpt(), mods) }
@@ -1165,8 +1165,8 @@ object Parsers {
1165
1165
}
1166
1166
else ident()
1167
1167
1168
- /** Expr ::= implicit Id `=>' Expr
1169
- * BlockResult ::= implicit Id [`:' InfixType] `=>' Block // Scala2 only
1168
+ /** Expr ::= implicit id `=>' Expr
1169
+ * BlockResult ::= implicit id [`:' InfixType] `=>' Block // Scala2 only
1170
1170
*/
1171
1171
def implicitClosure (start : Int , location : Location .Value , implicitMods : Modifiers ): Tree =
1172
1172
closureRest(start, location, funParams(implicitMods, location))
@@ -1177,9 +1177,9 @@ object Parsers {
1177
1177
Function (params, if (location == Location .InBlock ) block() else expr())
1178
1178
}
1179
1179
1180
- /** PostfixExpr ::= InfixExpr [Id [nl]]
1180
+ /** PostfixExpr ::= InfixExpr [id [nl]]
1181
1181
* InfixExpr ::= PrefixExpr
1182
- * | InfixExpr Id [nl] InfixExpr
1182
+ * | InfixExpr id [nl] InfixExpr
1183
1183
*/
1184
1184
def postfixExpr (): Tree =
1185
1185
infixOps(prefixExpr(), canStartExpressionTokens, prefixExpr, maybePostfix = true )
@@ -1204,7 +1204,7 @@ object Parsers {
1204
1204
* | xmlLiteral
1205
1205
* | Path
1206
1206
* | `(' [ExprsInParens] `)'
1207
- * | SimpleExpr `.' Id
1207
+ * | SimpleExpr `.' id
1208
1208
* | SimpleExpr (TypeArgs | NamedTypeArgs)
1209
1209
* | SimpleExpr1 ArgumentExprs
1210
1210
*/
@@ -1456,7 +1456,7 @@ object Parsers {
1456
1456
p
1457
1457
}
1458
1458
1459
- /** InfixPattern ::= SimplePattern {Id [nl] SimplePattern}
1459
+ /** InfixPattern ::= SimplePattern {id [nl] SimplePattern}
1460
1460
*/
1461
1461
def infixPattern (): Tree =
1462
1462
infixOps(simplePattern(), canStartExpressionTokens, simplePattern, notAnOperator = nme.raw.BAR )
@@ -1468,8 +1468,8 @@ object Parsers {
1468
1468
* | SimplePattern1 [TypeArgs] [ArgumentPatterns]
1469
1469
* SimplePattern1 ::= Path
1470
1470
* | `{' Block `}'
1471
- * | SimplePattern1 `.' Id
1472
- * PatVar ::= Id
1471
+ * | SimplePattern1 `.' id
1472
+ * PatVar ::= id
1473
1473
* | `_'
1474
1474
*/
1475
1475
val simplePattern = () => in.token match {
@@ -1586,7 +1586,7 @@ object Parsers {
1586
1586
def addMod (mods : Modifiers , mod : Mod ): Modifiers =
1587
1587
addFlag(mods, mod.flags).withAddedMod(mod)
1588
1588
1589
- /** AccessQualifier ::= "[" (Id | this) "]"
1589
+ /** AccessQualifier ::= "[" (id | this) "]"
1590
1590
*/
1591
1591
def accessQualifierOpt (mods : Modifiers ): Modifiers =
1592
1592
if (in.token == LBRACKET ) {
@@ -1665,16 +1665,16 @@ object Parsers {
1665
1665
1666
1666
/** ClsTypeParamClause::= `[' ClsTypeParam {`,' ClsTypeParam} `]'
1667
1667
* ClsTypeParam ::= {Annotation} [{Modifier} type] [`+' | `-']
1668
- * Id [HkTypeParamClause] TypeParamBounds
1668
+ * id [HkTypeParamClause] TypeParamBounds
1669
1669
*
1670
1670
* DefTypeParamClause::= `[' DefTypeParam {`,' DefTypeParam} `]'
1671
- * DefTypeParam ::= {Annotation} Id [HkTypeParamClause] TypeParamBounds
1671
+ * DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds
1672
1672
*
1673
1673
* TypTypeParamCaluse::= `[' TypTypeParam {`,' TypTypeParam} `]'
1674
- * TypTypeParam ::= {Annotation} Id [HkTypePamClause] TypeBounds
1674
+ * TypTypeParam ::= {Annotation} id [HkTypePamClause] TypeBounds
1675
1675
*
1676
1676
* HkTypeParamClause ::= `[' HkTypeParam {`,' HkTypeParam} `]'
1677
- * HkTypeParam ::= {Annotation} ['+' | `-'] (Id [HkTypePamClause] | _') TypeBounds
1677
+ * HkTypeParam ::= {Annotation} ['+' | `-'] (id [HkTypePamClause] | _') TypeBounds
1678
1678
*/
1679
1679
def typeParamClause (ownerKind : ParamOwner .Value ): List [TypeDef ] = inBrackets {
1680
1680
def typeParam (): TypeDef = {
@@ -1829,7 +1829,7 @@ object Parsers {
1829
1829
}
1830
1830
}
1831
1831
1832
- /** ImportExpr ::= StableId `.' (Id | `_' | ImportSelectors)
1832
+ /** ImportExpr ::= StableId `.' (id | `_' | ImportSelectors)
1833
1833
*/
1834
1834
val importExpr = () => path(thisOK = false , handleImport) match {
1835
1835
case imp : Import =>
@@ -1863,7 +1863,7 @@ object Parsers {
1863
1863
}
1864
1864
}
1865
1865
1866
- /** ImportSelector ::= Id [`=>' Id | `=>' `_']
1866
+ /** ImportSelector ::= id [`=>' id | `=>' `_']
1867
1867
*/
1868
1868
def importSelector (): Tree = {
1869
1869
val from = termIdentOrWildcard()
@@ -1908,9 +1908,9 @@ object Parsers {
1908
1908
}
1909
1909
1910
1910
/** PatDef ::= Pattern2 {`,' Pattern2} [`:' Type] `=' Expr
1911
- * VarDef ::= PatDef | Id {`,' Id } `:' Type `=' `_'
1912
- * ValDcl ::= Id {`,' Id } `:' Type
1913
- * VarDcl ::= Id {`,' Id } `:' Type
1911
+ * VarDef ::= PatDef | id {`,' id } `:' Type `=' `_'
1912
+ * ValDcl ::= id {`,' id } `:' Type
1913
+ * VarDcl ::= id {`,' id } `:' Type
1914
1914
*/
1915
1915
def patDefOrDcl (start : Offset , mods : Modifiers , docstring : Option [Comment ] = None ): Tree = atPos(start, nameStart) {
1916
1916
val lhs = commaSeparated(pattern2)
@@ -2012,8 +2012,8 @@ object Parsers {
2012
2012
Block (stats, Literal (Constant (())))
2013
2013
}
2014
2014
2015
- /** TypeDef ::= type Id [TypeParamClause] `=' Type
2016
- * TypeDcl ::= type Id [TypeParamClause] TypeBounds
2015
+ /** TypeDef ::= type id [TypeParamClause] `=' Type
2016
+ * TypeDcl ::= type id [TypeParamClause] TypeBounds
2017
2017
*/
2018
2018
def typeDefOrDcl (start : Offset , mods : Modifiers , docstring : Option [Comment ] = None ): Tree = {
2019
2019
newLinesOpt()
@@ -2055,7 +2055,7 @@ object Parsers {
2055
2055
}
2056
2056
}
2057
2057
2058
- /** ClassDef ::= Id [ClsTypeParamClause]
2058
+ /** ClassDef ::= id [ClsTypeParamClause]
2059
2059
* [ConstrMods] ClsParamClauses TemplateOpt
2060
2060
*/
2061
2061
def classDef (start : Offset , mods : Modifiers , docstring : Option [Comment ]): TypeDef = atPos(start, nameStart) {
@@ -2083,7 +2083,7 @@ object Parsers {
2083
2083
mods
2084
2084
}
2085
2085
2086
- /** ObjectDef ::= Id TemplateOpt
2086
+ /** ObjectDef ::= id TemplateOpt
2087
2087
*/
2088
2088
def objectDef (start : Offset , mods : Modifiers , docstring : Option [Comment ] = None ): ModuleDef = atPos(start, nameStart) {
2089
2089
val name = ident()
0 commit comments