handsontable / handsontable/hyperformula
[Research/Spike]: Ability to parse formulas for highlighting
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 171
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 7
Description
So I'm doing formula syntax highlighting in my spreadsheet like this example:

Currently hyperformula does formula parsing internally however there's no way to access it and the indexes in the string for it.
I tried to internally access lexer to do it but that doesn't work as it hasn't been parsed in the AST yet.
I also looked at getCellPrecedents, however this requires the cells to have been set already and in the dependency tree I think.
So something like:
@helper~
parseFormulas(text: string): string[].
Would be great.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing HyperFormula's internal lexer and AST parsing, then compare that path with getCellPrecedents and its dependency-tree requirements. The issue does not name files or tests; done means agreeing on and exposing a parsing entry point such as parseFormulas(text: string) that provides formula positions usable for syntax highlighting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100