Skip to content

Tolerate unclosed block comment #1041

@ariya

Description

@ariya

Consider the following test code (parsing in tolerant mode):

require('./esprima').parse('x /* foobar', { tolerant: true })

The current master branch will thrown an exception due to the error Line 1: Unexpected token ILLEGAL.

If this feature is implemented, it will return an AST because the unclosed block comment is tolerated. The error will be still listed in the errors array.

(Migrated from https://code.google.com/p/esprima/issues/detail?id=582, as reported by @mrennie)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions