Add support for arbitrary-length numbers
Open
Nobody has claimed this yet.
enhancement
help wanted
- Dominant language
- PHP
- Stars
- 26
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
$parser = Parser::createDefault();
$expression = $parser->parse("111111111111111111111111111111111111111111111111111111111111111111111111111");
var_dump($expression->evaluate()); // int(9223372036854775807)
$expression = $parser->parse("111111111111111111111111111111111111111111111");
var_dump($expression->evaluate()); // int(9223372036854775807)
$expression = $parser->parse("99999999999999999999999");
var_dump($expression->evaluate()); // int(9223372036854775807)
$expression = $parser->parse("9999999999999999999999999999999999");
var_dump($expression->evaluate()); // int(9223372036854775807)
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.
Research direction
Start with Parser::createDefault(), then trace parse() and evaluate() for the integer literals shown in the issue. Reproduce the examples to establish current behavior, inspect how numeric values are represented, and define completion as correct evaluation of numbers longer than the current integer range without breaking existing expressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100