-
-
Notifications
You must be signed in to change notification settings - Fork 32
Description
A mapping in a sourcemap can contain 1, 4, or 5 data points. The first is always the minified column number, the next 3 (if present) are the original file, line, and column, and the last (if present) is a name.
The obvious implication is that a mapping with only 1 data point should not have an original line or column number (if it did, it should tell us the file).
However, in such cases we currently simply carry over the last set line and column number unchanged. We do handle the src_id and name correctly by setting them to u32::MAX if they are missing, see
Lines 188 to 189 in 5243de7
| let mut src = !0; | |
| let mut name = !0; |
ETA: See also Note 2 under https://tc39.es/ecma426/#sec-mappings.
Segments with one field are intended to represent generated code that is unmapped because there is no corresponding original source code, such as code that is generated by a compiler.