peggyjs / peggy

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

Fixed documentation typo #494

Closed XenoS-ITA closed 4 months ago

XenoS-ITA commented 4 months ago

in the Importing External Rules section, where the --allowed-start-rules option was being remembered there was \* and not *

hildjj commented 4 months ago

In many shells, if you don't escape that '*', it's going to glob-expand to all of the files in cwd.

hildjj commented 4 months ago

I'd settle for '*' as a compromise that should work most places?

hildjj commented 4 months ago

Also, please add yourself to the AUTHORS file and add an entry in CHANGELOG.md

XenoS-ITA commented 4 months ago

ok, so probably only a windows thing (the fact that it will not escape it)

when executing npx peggy file.peggy --allowed-start-rules \* on CMD it will prompt with:

Error parsing grammar
Unknown start rule "\*"
XenoS-ITA commented 4 months ago

I'd settle for '*' as a compromise that should work most places?

that doesn't work either on windows. probably the best is to put both versions or --allowed-start-rules * (remember the to escape it on some shells)

hildjj commented 4 months ago

what happens with single quotes on windows? windows' shell makes very strange decisions because it leaves globbing to each program to do.

XenoS-ITA commented 4 months ago

what happens with single quotes on windows? windows' shell makes very strange decisions because it leaves globbing to each program to do.

same: Error parsing grammar Unknown start rule "'*'"

XenoS-ITA commented 4 months ago

What should i write in the changelog?

hildjj commented 4 months ago

do double quotes work?

In the changelog, put a link to this PR, and describe the change briefly. something like "updated docs to make `--allowedRules *` more clear