flow icon indicating copy to clipboard operation
flow copied to clipboard

Crash when parse hashbang with `{tokens: true}`

Open fisker opened this issue 2 years ago • 1 comments

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:

fisker avatar Mar 20 '23 02:03 fisker

Any progress here?

fisker avatar Oct 08 '24 14:10 fisker

@SamChou19815 Sorry for bothering, can you take a look?

fisker avatar May 15 '25 04:05 fisker