estools / esvalid

confirm that a SpiderMonkey format AST represents an ECMAScript program
26 stars 7 forks source link

Empty SwitchStatement is permitted. #41

Closed ikarienator closed 10 years ago

ikarienator commented 10 years ago

Test case: https://github.com/michaelficarra/esvalid/blob/master/test/unit.js#L147 Spec: http://es5.github.io/#x12.1

An empty SwitchStatement act as if it is a expression statement with only the discriminant.

michaelficarra commented 10 years ago

You're right. I think you meant to link to https://es5.github.io/#x12.11 though.