Commits

Chris Lattner committed 21b2e9e0571
add parser and AST representation support for where/else clauses on let/var decls, some highlights: - Enhance PBD with a whereExpr/elseStmt field to hold this. - Start parsing the pattern of let/var decls as a potentially refutable pattern. It becomes a semantic error to use a refutable pattern without an 'else' (diagnostics not in place yet). - Change validatePatternBindingDecl to use 'defer' instead of a goto to ensure cleanups on exit. - Have it resolve the pattern in a PBD, rewriting it from expressions into pattern nodes when valid. - Teach resolvePattern to handle TypedPatterns now that they can appear (wrapping) refutable patterns. - Teach resolvePattern to handle refutable patterns in PBD's without initializers by emitting a diagnostic instead of by barfing, fixing regressions on validation tests my previous patch caused, and fixing two existing validation test crashers. Sema, silgen, and more tests coming later. Swift SVN r26706