estools / esvalid

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

Error message for "too few switch case" is wrong. #30

Closed ikarienator closed 10 years ago

ikarienator commented 10 years ago

https://github.com/michaelficarra/esvalid/blob/8c54e7b3668e1c7734231e21251f51ac4b38c01b/index.js#L596

errors.push(new E(node, "SwitchStatement cases member length must be >= 2"));

It shall be ">= 1".