Skip to content

Error on valid break statement #48

@lachrist

Description

@lachrist

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]; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions