esvalid
esvalid copied to clipboard
Error on valid break statement
Hi, first thank for your handy module!!
I get a error on the code: a: try { break a; } finally { }
which is legal I believe.
Below is a minimal bug reproduction:
var Esprima = require('esprima');
var Esvalid = require('esvalid');
var code = 'a: try { break a; } finally { }';
var ast = Esprima.parse(code);
var errors = Esvalid.errors(ast);
if (errors.length > 0) { throw errors[0]; }
Confirmed.