Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fisker opened this issue Mar 20, 2023 · 0 comments
Open

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

fisker opened this issue Mar 20, 2023 · 0 comments

Comments

@fisker
Copy link

fisker commented Mar 20, 2023

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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants