catharsis
catharsis copied to clipboard
feature: update parser to allow negative numbers
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
@hegemonic would you be able to advise on next steps?