Parse: Parse switch statements (again).

Reimplement 'switch' parsing for our new AST representation, where cases contain patterns and 'where' guards, case blocks can have multiple cases, and 'default' is constrained to being the lone label of the last block if present. No type-checking or parsing of actual pattern productions yet.

Swift SVN r5834
This commit is contained in:
Joe Groff
2013-06-27 05:13:41 +00:00
parent 2cfd14b4c0
commit 45a69154bd
8 changed files with 254 additions and 12 deletions

View File

@@ -69,6 +69,7 @@ KEYWORD(fallthrough)
KEYWORD(switch)
KEYWORD(case)
KEYWORD(default)
KEYWORD(where)
// Expression keywords.
KEYWORD(new)