Skip to content

Commit af508c2

Browse files
committed
Update type alias soft keyword heuristic to be more strict about Equals placement
1 parent b2d67c7 commit af508c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

parser/src/soft_keywords.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ where
115115
}
116116
Tok::Lsqb => nesting += 1,
117117
Tok::Rsqb => nesting -= 1,
118-
_ => {}
118+
// Allow arbitrary content within brackets for now
119+
_ if nesting > 0 => {}
120+
// Exit if unexpected tokens are seen
121+
_ => break,
119122
}
120123
}
121124
}

0 commit comments

Comments
 (0)