File tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/parsing
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1886,6 +1886,7 @@ object Parsers {
1886
1886
* | `return' [Expr]
1887
1887
* | ForExpr
1888
1888
* | [SimpleExpr `.'] id `=' Expr
1889
+ * | PrefixOperator SimpleExpr `=' Expr
1889
1890
* | SimpleExpr1 ArgumentExprs `=' Expr
1890
1891
* | PostfixExpr [Ascription]
1891
1892
* | ‘inline’ InfixExpr MatchClause
@@ -2206,8 +2207,9 @@ object Parsers {
2206
2207
isOperator = ! (location.inArgs && followingIsVararg()),
2207
2208
maybePostfix = true )
2208
2209
2209
- /** PrefixExpr ::= [`-' | `+' | `~' | `!'] SimpleExpr
2210
- */
2210
+ /** PrefixExpr ::= [PrefixOperator'] SimpleExpr
2211
+ * PrefixOperator ::= ‘-’ | ‘+’ | ‘~’ | ‘!’
2212
+ */
2211
2213
val prefixExpr : Location => Tree = location =>
2212
2214
if isIdent && nme.raw.isUnary(in.name)
2213
2215
&& in.canStartExprTokens.contains(in.lookahead.token)
You can’t perform that action at this time.
0 commit comments