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