@@ -619,7 +619,7 @@ object Parsers {
619619 if in.isNewLine && ! (nextIndentWidth < startIndentWidth) then
620620 warning(
621621 if startIndentWidth <= nextIndentWidth then
622- i """ Line is indented too far to the right, or a `{' is missing before:
622+ i """ Line is indented too far to the right, or a `{` is missing before:
623623 |
624624 | $t"""
625625 else
@@ -638,7 +638,7 @@ object Parsers {
638638 case r : IndentSignificantRegion if in.isNewLine =>
639639 val nextIndentWidth = in.indentWidth(in.next.offset)
640640 if r.indentWidth < nextIndentWidth then
641- warning(i " Line is indented too far to the right, or a `{' is missing " , in.next.offset)
641+ warning(i " Line is indented too far to the right, or a `{` is missing " , in.next.offset)
642642 case _ =>
643643
644644/* -------- REWRITES ----------------------------------------------------------- */
@@ -1277,7 +1277,7 @@ object Parsers {
12771277 if in.token == WITH then
12781278 in.nextToken()
12791279 if in.token != LBRACE && in.token != INDENT then
1280- syntaxError(i " indented definitions or `{' expected " )
1280+ syntaxError(i " indented definitions or `{` expected " )
12811281 else
12821282 if silentTemplateIndent && ! isNew then in.observeIndented()
12831283 newLineOptWhenFollowedBy(LBRACE )
@@ -1797,8 +1797,8 @@ object Parsers {
17971797 }
17981798 case DO =>
17991799 in.errorOrMigrationWarning(
1800- i """ `do <body> while <cond>' is no longer supported,
1801- |use `while ({<body> ; <cond>}) ()' instead.
1800+ i """ `do <body> while <cond>` is no longer supported,
1801+ |use `while ({<body> ; <cond>}) ()` instead.
18021802 | ${rewriteNotice(" -language:Scala2Compat" )}
18031803 """ )
18041804 val start = in.skipToken()
@@ -2484,15 +2484,15 @@ object Parsers {
24842484 infixPattern() match {
24852485 case pt @ Ident (tpnme.WILDCARD_STAR ) =>
24862486 if (ctx.settings.strict.value)
2487- in.errorOrMigrationWarning(" The syntax `x @ _*' is no longer supported; use `x : _*' instead" , Span (startOffset(p)))
2487+ in.errorOrMigrationWarning(" The syntax `x @ _*` is no longer supported; use `x : _*` instead" , Span (startOffset(p)))
24882488 atSpan(startOffset(p), offset) { Typed (p, pt) }
24892489 case pt =>
24902490 atSpan(startOffset(p), 0 ) { Bind (name, pt) }
24912491 }
24922492 case p @ Ident (tpnme.WILDCARD_STAR ) =>
24932493 // compatibility for Scala2 `_*` syntax
24942494 if (ctx.settings.strict.value)
2495- in.errorOrMigrationWarning(" The syntax `_*' is no longer supported; use `x : _*' instead" , Span (startOffset(p)))
2495+ in.errorOrMigrationWarning(" The syntax `_*` is no longer supported; use `x : _*` instead" , Span (startOffset(p)))
24962496 atSpan(startOffset(p)) { Typed (Ident (nme.WILDCARD ), p) }
24972497 case p =>
24982498 p
@@ -2815,7 +2815,7 @@ object Parsers {
28152815 addMod(mods, mod)
28162816 else
28172817 if (! (mods.flags &~ (ParamAccessor | Inline | impliedMods.flags)).isEmpty)
2818- syntaxError(" `val' or `var' expected" )
2818+ syntaxError(" `val` or `var` expected" )
28192819 if (firstClause && ofCaseClass) mods
28202820 else mods | PrivateLocal
28212821 }
@@ -3100,7 +3100,7 @@ object Parsers {
31003100 val toInsert =
31013101 if (in.token == LBRACE ) s " $resultTypeStr = "
31023102 else " : Unit " // trailing space ensures that `def f()def g()` works.
3103- in.testScala2CompatMode(s " Procedure syntax no longer supported; ` $toInsert' should be inserted here" ) && {
3103+ in.testScala2CompatMode(s " Procedure syntax no longer supported; ` $toInsert` should be inserted here" ) && {
31043104 patch(source, Span (in.lastOffset), toInsert)
31053105 true
31063106 }
@@ -3441,7 +3441,7 @@ object Parsers {
34413441 constrApps(commaOK = true , templateCanFollow = true )
34423442 else if in.token == SUBTYPE then
34433443 if ! mods.is(Inline ) then
3444- syntaxError(" `<:' is only allowed for given with `inline' modifier" )
3444+ syntaxError(" `<:` is only allowed for given with `inline` modifier" )
34453445 in.nextToken()
34463446 TypeBoundsTree (EmptyTree , toplevelTyp()) :: Nil
34473447 else
@@ -3454,7 +3454,7 @@ object Parsers {
34543454 DefDef (name, tparams, vparamss, parents.head, subExpr())
34553455 else
34563456 parents match
3457- case TypeBoundsTree (_, _) :: _ => syntaxError(" `=' expected" )
3457+ case TypeBoundsTree (_, _) :: _ => syntaxError(" `=` expected" )
34583458 case _ =>
34593459 possibleTemplateStart()
34603460 val tparams1 = tparams.map(tparam => tparam.withMods(tparam.mods | PrivateLocal ))
@@ -3504,7 +3504,7 @@ object Parsers {
35043504 if (in.token == EXTENDS ) {
35053505 in.nextToken()
35063506 if (in.token == LBRACE || in.token == COLONEOL ) {
3507- in.errorOrMigrationWarning(" `extends' must be followed by at least one parent" )
3507+ in.errorOrMigrationWarning(" `extends` must be followed by at least one parent" )
35083508 Nil
35093509 }
35103510 else constrApps(commaOK = true , templateCanFollow = true )
@@ -3692,7 +3692,7 @@ object Parsers {
36923692 else if (! isStatSep)
36933693 syntaxErrorOrIncomplete(
36943694 " illegal start of declaration" +
3695- (if (inFunReturnType) " (possible cause: missing `=' in front of current method body)"
3695+ (if (inFunReturnType) " (possible cause: missing `=` in front of current method body)"
36963696 else " " ))
36973697 acceptStatSepUnlessAtEnd()
36983698 }
0 commit comments