Skip to content

feat: case-insensitive formulas and cell references#110

Merged
garritfra merged 2 commits into
mainfrom
case-insensitive-formulas
May 12, 2026
Merged

feat: case-insensitive formulas and cell references#110
garritfra merged 2 commits into
mainfrom
case-insensitive-formulas

Conversation

@garritfra
Copy link
Copy Markdown
Owner

Summary

  • Formulas and cell references are now case-insensitive: =sum(a1:a2) evaluates the same as =SUM(A1:A2), and true/false work alongside TRUE/FALSE.
  • The lexer accepts any ASCII letter and normalizes column letters to uppercase, so the parser, evaluator, dependency graph, and file I/O are unchanged.
  • col_label_to_index is also case-insensitive, so :sort a works.

Closes #108

Test plan

  • cargo test — 526 tests pass, including new regression tests in token.rs, eval.rs, and model.rs
  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets --all-features clean
  • Manually try =sum(a1:a2) in the TUI to confirm

🤖 Generated with Claude Code

garritfra and others added 2 commits May 12, 2026 14:13
Make `=sum(a1:a2)` evaluate the same as `=SUM(A1:A2)`. The lexer now
accepts any ASCII letter at the start of an identifier or cell reference
and normalizes the column letters to uppercase, so downstream code
(parser, evaluator, dependency graph, file I/O) is unchanged.
`col_label_to_index` is also case-insensitive so the `:sort` command
accepts lowercase column labels.

Closes #108

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ulas

# Conflicts:
#	crates/cell-sheet-core/src/formula/eval.rs
@garritfra garritfra merged commit fdfd2b0 into main May 12, 2026
10 checks passed
@garritfra garritfra deleted the case-insensitive-formulas branch May 12, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

formulas and references should be case-insensitive

1 participant