Rich-Harris / code-red

Experimental toolkit for writing x-to-JavaScript compilers
MIT License
333 stars 22 forks source link

`await` has wrong precedence #24

Closed Conduitry closed 4 years ago

Conduitry commented 4 years ago

From https://github.com/sveltejs/svelte/issues/4267

cr.print(cr.x`await (a || b)`).code

returns

await a || b

which is incorrect, as await has a higher precedence than ||.