Clone this repo:
  1. 96e5be3 Merge pull request #25 from dart-lang/davidmorgan-patch-1 by David Morgan · 6 weeks ago master
  2. 146b561 Update following review comments by David Morgan · 6 weeks ago
  3. 357f890 Fix analyzer warnings in parser_test.dart by David Morgan · 6 weeks ago
  4. af4e709 update pubspec/changelog for 0.10.4 by Jacob MacDonald · 10 months ago 0.10.4
  5. e7f1148 implement highlight for SourceMapFileSpan by Jacob MacDonald · 10 months ago

Source Maps

This project implements a Dart pub package to work with source maps. The implementation is based on the source map version 3 spec which was originated from the Closure Compiler and has been implemented in Chrome and Firefox.

In this package we provide:

  • Data types defining file locations and spans: these are not part of the original source map specification. These data types are great for tracking source locations on source maps, but they can also be used by tools to reporting useful error messages that include on source locations.
  • A builder that creates a source map programatically and produces the encoded source map format.
  • A parser that reads the source map format and provides APIs to read the mapping information.

Some upcoming features we are planning to add to this package are:

  • A printer that lets you generate code, but record source map information in the process.
  • A tool that can compose source maps together. This would be useful for instance, if you have 2 tools that produce source maps and you call one with the result of the other.