[SE-0276] Implement multi-pattern catch clauses

Like switch cases, a catch clause may now include a comma-
separated list of patterns. The body will be executed if any
one of those patterns is matched.

This patch replaces `CatchStmt` with `CaseStmt` as the children
of `DoCatchStmt` in the AST. This necessitates a number of changes
throughout the compiler, including:
- Parser & libsyntax support for the new syntax and AST structure
- Typechecking of multi-pattern catches, including those which
  contain bindings.
- SILGen support
- Code completion updates
- Profiler updates
- Name lookup changes
This commit is contained in:
Owen Voorhees
2019-10-12 15:22:42 -07:00
parent b78ed5319b
commit 43e2d107e1
45 changed files with 1001 additions and 482 deletions

View File

@@ -244,6 +244,8 @@ SYNTAX_NODE_SERIALIZATION_CODES = {
'PoundFilePathExpr': 240,
'DerivativeRegistrationAttributeArguments': 241,
'QualifiedDeclName': 242,
'CatchItem': 243,
'CatchItemList': 244,
}