Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define decoding algorithms for source maps (#119)
* Define decoding algorithms for source maps This PR introduces "decoded source map" data structures, which are internal spec representations of the information encoded in source maps. It also defines algorithms to decode source maps from either a JSON string or [infra](https://infra.spec.whatwg.org/) representation. The goal is: - use them to explicitly write down all the possible error cases - use them as a starting point to define new data structures, for example for the scopes proposal - eventually add algorithms such as "get the original location given a decoded source map and a generated location". This PR also explicitly defines sources/sourceRoot resolution in terms of the [WHATWG URL](https://url.spec.whatwg.org/) spec. * Fix indentation * Remove extra text * Asumu's review * Justin: rename variable * Justin: sources/sourcesContent can contain nulls * Justin: error on missing sources * Justin: fix source url resolution * Justin: handle call to "decode a base64 VLQ" at the string end * Return -2147483648 for B, and use natural arithmetic * Hoist * Hoist originalLine and originalColumn * Add note about deduplication * Remove todo comment
- Loading branch information