Skip to content

ParseError: Missing yield in generator #3

@dillonkrug

Description

@dillonkrug

I hesitate to make this issue as it's not really being caused by this module, but since esprima-fb doesn't have public issues, I'll put it here so others might find it.

This "Missing yield" error was causing browserify to give up halfway through a build, but according to the ecma bug tracker (#1551 and #1283) this is out of date.

I just put in a hack to get around it and everything works fine:

syntax-error/index.js Line 17~26
------------------------------------------------------------------------------
    function errorInfo (src, file) {
        try {
            esprima.parse(src);
            return;
        }
        catch (err) {
+           if (/Missing yield/.test(err.message)) return undefined;
            return new ParseError(err, src, file);
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions