You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If after the 'try' we are at a declaration or statement, it can't be a valid expression.
30
30
// Decide how we want to consume the 'try':
31
31
// If the declaration or statement starts at a new line, the user probably just forgot to write the expression after 'try' -> parse it as a TryExpr
32
32
// If the declaration or statement starts at the same line, the user maybe tried to use 'try' as a modifier -> parse it as unexpected text in front of that decl or stmt.
33
-
returnbacktrack.atStartOfLine
33
+
returnlookahead.atStartOfLine
34
34
}else{
35
35
returntrue
36
36
}
@@ -42,8 +42,8 @@ extension TokenConsumer {
42
42
break
43
43
}
44
44
ifself.at(.atSign) || self.at(.keyword(.inout)){
45
-
varbacktrack=self.lookahead()
46
-
ifbacktrack.canParseType(){
45
+
varlookahead=self.lookahead()
46
+
iflookahead.canParseType(){
47
47
returntrue
48
48
}
49
49
}
@@ -54,8 +54,8 @@ extension TokenConsumer {
54
54
// expansion, but we need to do more lookahead to figure out
55
55
// whether the '{' is the start of a closure expression or a
56
56
// brace statement for 'repeat { ... } while'
57
-
letbacktrack=self.lookahead()
58
-
returnbacktrack.peek().rawTokenKind !=.leftBrace
57
+
letlookahead=self.lookahead()
58
+
returnlookahead.peek().rawTokenKind !=.leftBrace
59
59
}
60
60
61
61
returnfalse
@@ -397,8 +397,8 @@ extension Parser {
397
397
)->RawExprSyntax{
398
398
// Try to parse '@' sign or 'inout' as an attributed typerepr.
0 commit comments