Skip to content

feature: update parser to allow negative numbers#76

Open
81reap wants to merge 1 commit intohegemonic:mainfrom
81reap:negative-numbers
Open

feature: update parser to allow negative numbers#76
81reap wants to merge 1 commit intohegemonic:mainfrom
81reap:negative-numbers

Conversation

@81reap
Copy link

@81reap 81reap commented May 7, 2025

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

> catharsis@0.11.0 build
> npx peggy ./lib/parser.pegjs

prayagbhakar@MacBookPro catharsis % npm run default

> catharsis@0.11.0 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                   

> catharsis@0.11.0 build
> npx peggy ./lib/parser.pegjs

prayagbhakar@MacBookPro catharsis % npm run test                    

> catharsis@0.11.0 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
Copy link
Author

81reap commented Jul 26, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant