[Parse] Allow named opaque types in more places

- Allow named opaque types in typed patterns and subscripts
- Fix inheritance clause printing for `GenericParamList`
- clang-format changes from previous commit on this branch
This commit is contained in:
Benjamin Driscoll
2021-06-24 10:59:28 -04:00
parent dddf0eceb0
commit deb0457032
12 changed files with 164 additions and 153 deletions

View File

@@ -1223,6 +1223,13 @@ public:
ParserResult<TypeRepr> parseType(Diag<> MessageID,
bool IsSILFuncDecl = false);
/// Parse a type optionally prefixed by a list of named opaque parameters. If
/// no params present, return 'type'. Otherwise, return 'type-named-opaque'.
///
/// type-named-opaque:
/// generic-params type
ParserResult<TypeRepr> parseTypeWithOpaqueParams(Diag<> MessageID);
ParserResult<TypeRepr>
parseTypeSimpleOrComposition(Diag<> MessageID);