mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
`LineOffsetTables` records mappings from byte offset to line and column numbers (with column number in UTF-16 characters). Most lines do not contain any Unicode characters, and for these lines there is an exact correspondence between number of bytes from start of line and UTF-16 column number, so no column lookup table is required. Reduce the data stored for each line from 32 bytes to 8 bytes by storing column offset lookup tables for the rare lines which do contain Unicode chars separately. Additionally, store column lookup tables as a `Box<[u32]>` instead of `Vec<u32>` to reduce the size of `ColumnOffsets` by 8 bytes. |
||
|---|---|---|
| .. | ||
| examples | ||
| src | ||
| tests/integration | ||
| Cargo.toml | ||
| CHANGELOG.md | ||