On 13-07-30 10:17 AM, Patrick Walton wrote:
On 7/30/13 10:05 AM, Graydon Hoare wrote:Trickier call. We don't allow type ascription inside patterns, only at the outermost level. I think we found that our grammars were sufficiently similar that intermixing them inside one another produced ambiguities, though I don't remember off hand which one. Possibly the ambiguity between "{<field_name>:<pat>}" and "{<field_name>:<ty>}".I actually don't think there's an ambiguity here any longer; type ascription inside patterns seems like a useful feature to me.
Really? How would you resolve it? You have to decide after seeing "{x:" which grammar to switch into parsing. Currently we go with the pattern grammar there.
-Graydon _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
