[Parse] Disallow space between attribute name and '(' in Swift 6 mode

This allows us to resolve disambiguities of whether a parenthesis belong to an argument to the attribute or if it is eg. the start of a tuple.
This commit is contained in:
Alex Hoppen
2024-01-29 22:56:25 -08:00
parent cc5e79b521
commit c6e425a559
6 changed files with 108 additions and 42 deletions

View File

@@ -1514,6 +1514,9 @@ ERROR(decl_attribute_applied_to_type,none,
ERROR(attr_extra_whitespace_after_at,PointsToFirstBadToken,
"extraneous whitespace between '@' and attribute name", ())
ERROR(attr_extra_whitespace_before_lparen,PointsToFirstBadToken,
"extraneous whitespace between attribute name and '('", ())
ERROR(attr_expected_lparen,none,
"expected '(' in '%0' %select{attribute|modifier}1", (StringRef, bool))