dart-lang / source_maps

A package to programmatically manipulate source maps.
https://pub.dev/packages/source_maps
BSD 3-Clause "New" or "Revised" License
16 stars 14 forks source link

Emit spans with reasonable ends #3

Open nex3 opened 9 years ago

nex3 commented 9 years ago

Currently (unless the user passes in SourceFiles) the spans emitted by this package don't have useful end locations. Non-identifier spans are always point locations, although typically a source map entry is considered to continue until the next entry rather than being a single point. Identifier spans are even worse: their text fields are used to contain the identifier, which is often (usually) not actual text from the source file, which is what the field is for.

Issue dart-lang/source_span#3 will allow these spans to have the correct end position set without necessarily having access to the text of the span.