// Current ES spec grammar
1 + yield // error
1 + yield 2 // error
yield + 1 // yield (+1)
yield 1 + yield 2 // error
yield(1) + yield(2) // error
yield 1 + 2 // yield (1+2)
yield * yield // (yield *) yield
yield + yield // error
// C# await grammar
1 + yield // 1 + (yield)
1 + yield 2 // 1 + (yield 2)
yield + 1 // (yield) + 1
yield 1 + yield 2 // (yield 1) + (yield 2)
yield(1) + yield(2) // (yield(1)) + (yield(2))
yield 1 + 2 // (yield 1) + 2
yield * yield // (yield) * (yield)
yield + yield // (yield) + (yield)
I believe the await
style precendence is more expected in all but one case. Certainly a ES7 await
would align with the C# precendence. But are we sure that ES6 yield
shouldn't also match?