Expand description
Cell, coordinate, and range reference utilities for a spreadsheet engine.
§Design goals
- Compact: small,
Copy‑able types (12–16 bytes) that can be placed in large dependency graphs without GC/heap pressure. - Excel‑compatible semantics: four anchoring modes (
A1,$A1,A$1,$A$1) plus optional sheet scoping. - Utility helpers: rebasing, offsetting, (de)serialising, and pretty
Display.
┌──────────┐ 1) Parser/loader creates ┌─────────────┐
│ Coord │────┐ │ CellRef │
└──────────┘ └──────┐ 2) Linker inserts ─▶└─────────────┘
row, col, flags │ SheetId + range
▼
┌────────────────┐ (RangeRef = 2×CellRef)
│ Evaluation IR │ (row/col absolute, flags dropped)
└────────────────┘Structs§
Functions§
- combine_
references - Combine two references with the range operator ‘:’ Supports combining Cell:Cell, Cell:Range (and Range:Cell), and Range:Range on the same sheet. Returns #REF! for cross-sheet combinations or incompatible shapes.
Type Aliases§
- SheetId
- Sheet identifier inside a workbook.