Feature request: Support (optional) bigint during parsing
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start with src/impl/parser.ts around lines 515-519, where number literals are currently parsed. Trace how parsed values are exposed and determine where an optional bigint behavior could be configured. Done means large integer literals can be parsed with BigInt when requested without changing default parsing behavior.
Written by the indexing model from the issue text.
Description
Currently, number literal will be parsed by the following code:
It would be better to add a feature that allow detecting the number and parsing it with BigInt, like:
// -9007199254740991 ~ 9007199254740991
// More precise checking could be used, here's only a demo
if (/^-?\d{16,}$/.test(tokenValue)) {
value = BigInt(tokenValue)
}
- Dominant language
- TypeScript
- Stars
- 759
- Forks
- 66
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 7
Contributor guide
No contributing guide indexed for this repository
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.
More from microsoft/node-jsonc-parser
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
microsoft/node-jsonc-parser#125 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
microsoft/node-jsonc-parser#105 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/node-jsonc-parser#103 · 2 comments · 8 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
microsoft/node-jsonc-parser#97 · 2 reactions ·
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
All issues in microsoft/node-jsonc-parser
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·