On Wed, Sep 25, 2013 at 08:29:17AM -0700, Patrick Walton wrote: > If we did this, we wouldn't know whether to parse a pattern or an > expression when starting a statement. This isn't fixable without > trying to define some sort of cover grammar that covers both > expressions and patterns, like ECMAScript 6 does. I don't know if > this would work in Rust.
I've been wondering about this. To accommodate a use case like (a, b) = ... we don't actually need to have a grammar that covers *all* expressions and patterns, but rather just a grammar for *lvalues and irrefutable patterns*. I feel like this is do-able, but I confess I haven't thought too hard about it. Anyway, seems like a nice-to-have, but not a high priority. Niko _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev