Skip to content

Crash when parse hashbang with {tokens: true} #9024

Open
@fisker

Description

@fisker

Flow version: 0.202.0

Expected behavior

> require('flow-parser').parse('#!/usr/bin/env node\n', {tokens: true})
<CWD>\node_modules\flow-parser\flow_parser.js:807
throw a}function
^

Error: Internal error: Offset_utils.Offset_lookup_failed(_, "Failure while looking up column. Index: -1. Length: 1.")

\n after hashbang is required to reproduce.

Actual behavior

  • Link to Try-Flow or Github repo:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions