...
Created attachment 321204 [details] work in progress
Created attachment 321226 [details] maybe it might work
Created attachment 321399 [details] seems to work I still need to write more tests, like tests for the interaction between enum and switch.
Created attachment 321409 [details] the patch
Comment on attachment 321409 [details] the patch r=me.
Landed in https://trac.webkit.org/changeset/222330/webkit
<rdar://problem/34693320>
Migrated to https://github.com/gpuweb/WHLSL/issues/132