catharsis icon indicating copy to clipboard operation
catharsis copied to clipboard

feature: update parser to allow negative numbers

Open 81reap opened this issue 11 months ago • 1 comments

There is this issue in JSDoc where negative numbers are not being parsed correctly. Since JSDoc uses catharsis to parse types, I created this PR to fix the issue.

Testing

Before

prayagbhakar@MacBookPro catharsis % npm run build

> [email protected] build
> npx peggy ./lib/parser.pegjs

prayagbhakar@MacBookPro catharsis % npm run default

> [email protected] default
> npx hereby lint-and-test

Using ~/workspace/catharsis/Herebyfile.mjs to run lint-and-test
Starting lint
Starting test

Executing 49 defined specs...
Running in random order... (seed: 36352)

>> Done!


Summary:

👊  Passed
Suites:  8 of 8
Specs:   49 of 49
Expects: 190 (0 failures)
Finished in 0.125 seconds

Finished test in 213ms
Finished lint in 1.2s
Completed lint-and-test in 1.2s

After

prayagbhakar@MacBookPro catharsis % npm run build                   

> [email protected] build
> npx peggy ./lib/parser.pegjs

prayagbhakar@MacBookPro catharsis % npm run test                    

> [email protected] test
> npx hereby test

Using ~/workspace/catharsis/Herebyfile.mjs to run test
Starting test

Executing 49 defined specs...
Running in random order... (seed: 58685)

>> Done!


Summary:

👊  Passed
Suites:  8 of 8
Specs:   49 of 49
Expects: 195 (0 failures)
Finished in 0.124 seconds

Finished test in 202ms
Completed test in 203ms

81reap avatar May 07 '25 03:05 81reap

@hegemonic would you be able to advise on next steps?

81reap avatar Jul 26 '25 00:07 81reap