LINES_PACKAGE
const LINES_PACKAGE: IEnginePackage;Defined in: packages/engine/src/packages/lines/LinesPackage.ts:47
Cross-line data access, reading another line’s cached result from
inside an expression. Confirmed by FOUR independent competitor apps
wanting the exact same underlying capability (Numi’s prev, Notes
Calculator’s line<N>, Numbr’s sum/total-to-header, NumPad’s
line<N> plus range aggregation). See the internal parity notes’
“Confirmed engine limitations” item 1, now closed.
Built entirely on vm/VM.ts’s LineExecutionContext, threaded
optionally through CALL_PLUGIN, every handler here explicitly checks
for Pending/Error/unevaluated lines before doing arithmetic (see
LinesPluginFunctions.ts’s module doc) rather than silently coercing
via .toNumber() (which returns 0 for both Pending and Error).
Trigger-word collision decisions (this codebase’s established
phrase-fusion-vs-bare-keyword policy, see ARCHITECTURE.md §5.1):
prev, bare keyword (nothing to phrase-fuse against, same shape asclamp). Accepted risk.line1/line 1, normalizer-fused intoLINE_REF, never claims barelineas a keyword (:line = 5stays untouched). Thel1/l 1short alias documented by some competitors is deliberately NOT implemented in this pass,lis too common a variable name; shipline<N>first, add a narrowerl<N>form later if real usage wants it.sum(/total(/average(, normalizer-fused ONLY when immediately followed byLPAREN, so:sum = 100and MathPhrases’ existing"total of X, Y"phrase (no paren after “of”) are both unaffected.- “aggregate everything above until a blank line/heading”
phrase-fused as
"total above"/"sum above"/"average above"(deliberately NOT Numi/Numbr’s baretotal/sumwording, that’s exactly the bare-keyword collision class this codebase already regressed on once, seeMathPhrasesPackage.ts’s “total” note).