Commits

Joe Groff committed 6449655e217
Implement selector-style function definition syntax. rdar://12315571 Allow a function to be defined with this syntax: func doThing(a:Thing) withItem(b:Item) -> Result { ... } This allows the keyword names in the function type (in this case `(_:Thing, withItem:Item) -> Result`) to differ from the names bound in the function body (in this case `(a:Thing, b:Item) -> Result`, which allows for Cocoa-style `verbingNoun` keyword idioms to be used without requiring those keywords to also be used as awkward variable names. In addition to modifying the parser, this patch extends the FuncExpr type by replacing the former `getParamPatterns` accessor with separate `getArgParamPatterns` and `getBodyParamPatterns`, which retrieve the argument name patterns and body parameter binding patterns respectively. Swift SVN r3098