MCPcopy Create free account

hub / github.com/SamuelSchlesinger/tshts / functions

Functions1,456 in github.com/SamuelSchlesinger/tshts

↓ 485 callersMethodsend_text
Send literal text. Special characters are NOT escaped — newlines in `s` will be sent as `\n`. For Enter use [`send_enter`].
tests/common/mod.rs:164
↓ 327 callersMethodclone
`Mutex<HashMap>` doesn't implement `Clone`. We hand-roll the impl so cloning a Spreadsheet snapshots the cells and other persistent state but DROPS th
src/domain/models/spreadsheet/mod.rs:55
↓ 269 callersMethodsend_enter
Send a `\r` (Enter / Return).
tests/common/mod.rs:169
↓ 232 callersMethodset_cell
Writes a cell. Sweeps any spill ghosts owned by the previous version of this cell, writes `data` as-is (caller is responsible for the `value` field —
src/domain/models/spreadsheet/mod.rs:181
↓ 174 callersMethodis_empty
(&self)
src/domain/models/dep_graph.rs:61
↓ 171 callersMethodcurrent_sheet
Gets a reference to the active sheet.
src/domain/models/workbook.rs:260
↓ 161 callersMethodto_number
(&self)
src/domain/parser/mod.rs:175
↓ 160 callersMethodassert_contains
(&self, needle: &str)
tests/common/mod.rs:302
↓ 145 callersMethodregister_function
Registers a new function. Default purity is `Pure`; use `register_function_with_purity` for volatile / side-effecting functions.
src/domain/parser/registry.rs:48
↓ 124 callersFunctionenter_cell
Type a literal or formula into the given cell and commit with Enter. The whole `Esc Ctrl-G <addr> Enter i <content> Enter` sequence is one PTY write s
tests/common/scenarios/mod.rs:305
↓ 124 callersMethodget_cell
Returns the cell at `(row, col)`, or a default empty cell if unset. ``` use tshts::domain::Spreadsheet; let sheet = Spreadsheet::default(); assert!(
src/domain/models/spreadsheet/mod.rs:151
↓ 119 callersMethodset_cell_with_undo
(&mut self, row: usize, col: usize, new_data: CellData)
src/application/state/mod.rs:528
↓ 100 callersMethodexpect
Checks if the current token matches the expected token and advances.
src/domain/parser/parser_impl.rs:53
↓ 77 callersMethodclear
Clear every edge.
src/domain/models/dep_graph.rs:66
↓ 76 callersFunctiontypestr
(app: &mut App, s: &str)
src/presentation/input/visual/tests.rs:12
↓ 71 callersMethodevaluate
Evaluates an expression AST to a value result.
src/domain/parser/evaluator/mod.rs:197
↓ 65 callersMethodparse
Parses the top-level expression.
src/domain/parser/parser_impl.rs:62
↓ 63 callersFunctiontypestr
(app: &mut App, s: &str)
src/presentation/input/normal/tests.rs:12
↓ 56 callersMethodcurrent_sheet_mut
Gets a mutable reference to the active sheet.
src/domain/models/workbook.rs:265
↓ 41 callersFunctionlit
Format an `f64` for inclusion in a tshts formula. Avoids scientific notation, which the parser doesn't accept, and keeps full precision.
tests/common/scenarios/mod.rs:386
↓ 41 callersMethodwith_tolerance
(mut self, tol: f64)
tests/common/scenarios/mod.rs:81
↓ 40 callersMethodadvance
Advances to the next character in the input.
src/domain/parser/lexer.rs:26
↓ 39 callersMethodrecalc_via_graph_result
( &mut self, )
src/domain/models/workbook.rs:678
↓ 38 callersMethodadd_sheet
Adds a new empty sheet with the given name. Allocates a fresh [`SheetId`] from the monotonic counter so the new sheet has a stable identity for the du
src/domain/models/workbook.rs:272
↓ 37 callersMethodevaluate_formula
Returns the evaluated result, "#ERROR" on failure, or `formula` unchanged if it doesn't start with `=`. ``` use tshts::domain::{Spreadsheet, FormulaE
src/domain/services/evaluator/mod.rs:100
↓ 36 callersMethodensure_cursor_visible
(&mut self)
src/application/state/mod.rs:670
↓ 35 callersMethodjoin
The join (least upper bound) on the purity lattice. Used by the AST walker to combine the purities of a formula's subexpressions.
src/domain/parser/mod.rs:485
↓ 35 callersMethodmark_dirty
Mark a single cell as dirty. The cell's value may be stale and must be recomputed on the next recalc. Future readers (the parallel calc executor in PR
src/domain/models/workbook.rs:1177
↓ 33 callersMethodadvance
Advances to the next token.
src/domain/parser/parser_impl.rs:47
↓ 33 callersFunctioncreate_test_spreadsheet
()
src/domain/services/evaluator/tests.rs:15
↓ 32 callersMethodbuild_dep_graph_from_scratch
Rebuild the workbook-level [`WorkbookGraph`] from scratch by walking every formula cell on every sheet and registering its dependencies. Also populate
src/domain/models/workbook.rs:346
↓ 32 callersMethodsend_esc
Send a `\x1b` (Escape).
tests/common/mod.rs:174
↓ 30 callersFunctionenter_cells
Bulk-populate a list of (address, content) pairs.
tests/common/scenarios/mod.rs:333
↓ 29 callersFunctiontypestr
(app: &mut App, s: &str)
src/presentation/input/editing.rs:77
↓ 26 callersMethodstart_command_palette
(&mut self)
src/application/state/command/mod.rs:12
↓ 25 callersMethodformula_bar
Returns the formula-bar row. Use for assertions like `assert!(h.formula_bar().contains("=A1+B1"))`.
tests/common/mod.rs:245
↓ 24 callersMethodadjust_formula_references
Shifts relative cell references by the given offsets; absolute parts (`$col` / `$row`) are preserved. Used for fill and paste. ``` use tshts::domain:
src/domain/services/evaluator/adjust.rs:29
↓ 24 callersFunctionn
(s: u32, r: usize, c: usize)
src/domain/models/dep_graph.rs:280
↓ 24 callersFunctionput
(app: &mut App, row: usize, col: usize, s: &str)
src/presentation/input/visual/tests.rs:29
↓ 24 callersMethodset_cell_on_active
Write a single cell on the active sheet. Updates the unified graph for this cell, marks dirty, and runs a single graph-driven recalc to propagate the
src/domain/models/workbook.rs:1225
↓ 21 callersMethodassert_absent
(&self, needle: &str)
tests/common/mod.rs:317
↓ 21 callersMethodexecute_command
(&mut self)
src/application/state/command/mod.rs:19
↓ 21 callersMethodget_selection_range
(&self)
src/application/state/mod.rs:645
↓ 21 callersFunctionquit_force
(h: &mut Harness)
tests/pty_ux.rs:9
↓ 21 callersFunctionrun_palette
(app: &mut App, cmd: &str)
src/presentation/input/dialogs.rs:421
↓ 21 callersMethodstart_editing
(&mut self)
src/application/state/editing.rs:6
↓ 20 callersMethodas_str
(&self)
src/domain/parser/mod.rs:136
↓ 20 callersMethodflatten
Flatten arrays and lists into a vector of scalar values.
src/domain/parser/mod.rs:219
↓ 19 callersMethodrecord_action
(&mut self, action: UndoAction)
src/application/state/mod.rs:397
↓ 19 callersFunctionrun
Run a scenario end-to-end against a fresh PTY harness. Panics with a structured multi-line message if any check fails or any cell value can't be pars
tests/common/scenarios/mod.rs:160
↓ 18 callersMethodlink
Register that `node` depends on each cell in `prereqs`. ADDS edges to any pre-existing set — does NOT remove edges the node had before. Use [`set_prer
src/domain/models/dep_graph.rs:76
↓ 18 callersFunctionquit_force
(h: &mut Harness)
tests/pty_edges.rs:9
↓ 18 callersMethodsend_ctrl
Send a Ctrl-modified ASCII letter, e.g. `send_ctrl('c')` sends 0x03. Case-insensitive on the argument.
tests/common/mod.rs:188
↓ 18 callersFunctionset_text
(app: &mut App, row: usize, col: usize, s: &str)
src/presentation/input/editing.rs:88
↓ 17 callersFunctionchar_to_byte_pos
(s: &str, char_pos: usize)
src/presentation/input/mod.rs:8
↓ 17 callersFunctioncollect_numbers
Common helper for statistical functions: flattens args and parses each value as f64 (numbers as-is, strings via parse).
src/domain/parser/registry_fns/numeric.rs:661
↓ 17 callersFunctionflatten_args
Convenience: flatten an iterator of values into a single vec.
src/domain/parser/mod.rs:229
↓ 17 callersFunctionquit_force
(h: &mut Harness)
tests/pty_power.rs:9
↓ 17 callersFunctionquit_force
(h: &mut Harness)
tests/pty_advanced.rs:11
↓ 16 callersMethodclear_selection
(&mut self)
src/application/state/mod.rs:638
↓ 16 callersMethodfirst_error
Return the first contained error, if any.
src/domain/parser/mod.rs:208
↓ 16 callersFunctionquit_force
(h: &mut Harness)
tests/pty_polish.rs:9
↓ 16 callersMethodsend
Write raw bytes to the PTY's master end. Most tests should prefer the typed helpers below, but this is here for sending arbitrary sequences.
tests/common/mod.rs:156
↓ 16 callersMethodsend_arrow
Send an arrow key (xterm-style escape sequences).
tests/common/mod.rs:200
↓ 16 callersMethodvim_exit_visual
(&mut self)
src/application/state/vim.rs:28
↓ 14 callersMethodget_column_width
Custom width if set, else the spreadsheet's default.
src/domain/models/spreadsheet/mod.rs:564
↓ 14 callersFunctionmake_dirty
(app: &mut App)
src/presentation/input/dialogs.rs:414
↓ 13 callersMethodautofill_selection
(&mut self)
src/application/state/autofill.rs:6
↓ 13 callersMethodis_truthy
(&self)
src/domain/parser/mod.rs:186
↓ 13 callersMethodrun
( &self, plan: &RecalcPlan, ctx: &mut RecalcContext, wb: &mut Workbook, )
src/domain/services/executor.rs:138
↓ 13 callersMethodscreen_contents
Full screen contents as a `\n`-joined string, one line per row, trailing whitespace included. Useful for `assert!(screen.contains(...))`.
tests/common/mod.rs:214
↓ 13 callersMethodtopo_levels_from_seeds
Topological levels of the dirty closure starting from `seeds`. Level 0 = seeds; level k+1 depends only on nodes in levels ≤k. Each level is internally
src/domain/models/dep_graph.rs:194
↓ 12 callersFunctioncolumn_label
(col: usize)
tests/common/scenarios/sensitivity.rs:120
↓ 12 callersFunctionforget
Drop a single URL from the cache. Lets tests reset just their own seeded entry without nuking the global cache (which the parallel test runner is shar
src/infrastructure/fetcher.rs:488
↓ 12 callersFunctionquit_force
(h: &mut Harness)
tests/pty_insert.rs:11
↓ 12 callersFunctionquit_force
(h: &mut Harness)
tests/pty_workflows.rs:11
↓ 12 callersFunctionregister
Register all `web` builtin functions on `reg`.
src/domain/parser/registry_fns/web.rs:11
↓ 12 callersMethodvim_apply_operator
( &mut self, op: VimOperator, r0: usize, c0: usize, r1: usize,
src/application/state/vim.rs:34
↓ 11 callersFunctioncreate_test_spreadsheet
()
src/domain/parser/evaluator/tests.rs:5
↓ 11 callersMethodcross_sheet_key_to_node
(&self, key: &CrossSheetKey)
src/domain/models/workbook.rs:446
↓ 11 callersMethodinsert_row_on_active
Structural row insert on the active sheet, with cross-sheet ref adjustment on every other sheet. If Sheet2 has `=Sheet1!A5` and we insert a row above
src/domain/models/workbook.rs:806
↓ 11 callersFunctionkey
(app: &mut App, code: KeyCode)
src/presentation/input/editing.rs:82
↓ 11 callersMethodmark_all_formula_cells_dirty
Mark every cell on every sheet that holds a formula as dirty. Used by structural edits and sheet rename/remove: those operations can shift refs anywhe
src/domain/models/workbook.rs:856
↓ 11 callersFunctionshape_of
Returns (rows, cols, data) for a value. Scalars are 1×1. `List` is 1×N (or N×1 — we treat it as a single row by convention).
src/domain/parser/mod.rs:235
↓ 10 callersFunctionchar_count
(s: &str)
src/presentation/input/mod.rs:15
↓ 10 callersFunctionenable_network_for_test
Helper: ensure the network gate is open (the default is closed for safety) and that the domain layer's global HTTP fetcher is wired to the production
src/domain/services/evaluator/tests.rs:2552
↓ 10 callersFunctionquit_force
(h: &mut Harness)
tests/pty_spill.rs:8
↓ 10 callersMethodrecalc_all
(&mut self)
src/application/state/mod.rs:360
↓ 10 callersMethodstart_save_as
(&mut self)
src/application/state/io.rs:29
↓ 10 callersMethodundo
(&mut self)
src/application/state/mod.rs:430
↓ 9 callersMethodfinish_editing
(&mut self)
src/application/state/editing.rs:176
↓ 9 callersFunctioninner
()
src/infrastructure/autosave.rs:48
↓ 9 callersFunctionkey
(app: &mut App, code: KeyCode)
src/presentation/input/visual/tests.rs:17
↓ 9 callersMethodrebuild_cross_sheet_deps
Rebuild the unified dep graph from scratch by scanning every formula in every sheet. Called after load (the graph isn't serialized), after structural
src/domain/models/workbook.rs:1546
↓ 9 callersFunctionrun_archetype
(name: &str, n: usize, iters: usize, builder: impl Fn() -> Workbook)
benches/calc_engine.rs:187
↓ 9 callersFunctionserial_to_date
(serial: f64)
src/domain/parser/mod.rs:636
↓ 9 callersMethodset_selection_format
(&mut self, number_format: NumberFormat)
src/application/state/formatting.rs:144
↓ 9 callersMethodsweep_spill_ghosts_for
Clear any spill ghosts whose anchor is the given cell. Called before the cell is rewritten so we don't leak stale ghosts when the formula's array shap
src/domain/models/spreadsheet/mod.rs:222
↓ 9 callersFunctionunique_tmp
(name: &str)
src/presentation/input/dialogs.rs:426
↓ 9 callersMethodupdate_selection
(&mut self, row: usize, col: usize)
src/application/state/mod.rs:631
next →1–100 of 1,456, ranked by callers