peggyjs / peggy

Peggy: Parser generator for JavaScript
https://peggyjs.org/
MIT License
914 stars 65 forks source link

Example nits #424

Closed hildjj closed 1 year ago

hildjj commented 1 year ago

Makes a few tiny changes to the docs for clarity. Updates dependencies, since I was there.

hildjj commented 1 year ago

OK, i'm done fiddling with this if anyone wants to review.

hildjj commented 1 year ago

(sorry I added to it after your review, @Mingun)

hildjj commented 1 year ago

I want to resolve https://github.com/peggyjs/peggy/issues/403 before merging this. One thing that might need to change in the docs is to add a typescript example which uses import * as peggy from 'peggy'

hildjj commented 1 year ago

I checked that TS didn't require any special effort, and that it was returning the correct types. Tried to make it more clear that most people should be using the CLI and not the API anyway. Found a couple of ways to configure TS that required import * as peggy, so added that as a hint.