Commits

Joe Groff committed dc016b8d7e8
Parse: Fake parsing type parameters in expressions When parsing an expression, if we see the production [[identifier '<']], use the following heuristic to choose whether to parse it as a type list or as an operator expression: - Speculatively parse the subsequent production as a type parameter list. - If the parse succeeds, examine the token after the closing '>'. If it is one of the following: l_paren_following l_square_following r_paren r_square l_brace r_brace comma semicolon period then accept the parse as a type list. - If the parse fails, or if the type list is not followed by one of those tokens, reject the type list and parse as an operator expression. This only implements the parsing rule. The type parameters are just dropped on the floor--the AST representation and Sema changes are forthcoming. Encouragingly, no test or library code appears to be broken by this rule. Swift SVN r4044