Skip to content

import- and export-specific lexing should stop after import/export statement #4491

Closed
@helixbass

Description

@helixbass

In lexer.coffee, @seenImport and @seenExport only get reset by an explicit ;. Thus allowing some devious edge cases to fail that should work, eg this works:

import * as lib from 'lib';
foo as       # foo(as)
3 * as 4     # 3 * as(4)
from 'foo'   # from('foo')

But if you remove the ;, any of the following lines would break

Will submit what I believe to be a fixing pull request momentarily

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions