flow icon indicating copy to clipboard operation
flow copied to clipboard

Inconsistent `Program.range` with other parsers

Open fisker opened this issue 5 years ago • 0 comments

Flow version: 0.138.0

Expected behavior

When parsing " a ", other parsers like babel/espree(EDIT: espree has {start:0, end:3, range: [1,2]})/acorn returns Program.range equals to [0, 3]

Actual behavior

> require('flow-parser').parse(' a ').range
[ 1, 2 ]
  • Link to Try-Flow or Github repo: N/A

fisker avatar Nov 19 '20 06:11 fisker