github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.15k stars 4.21k forks source link

Change PEG.js to use Peggy grammar #7018

Closed spenserblack closed 1 month ago

spenserblack commented 1 month ago

Description

Continuation based on https://github.com/github-linguist/linguist/pull/7017#issuecomment-2315736685

According to a maintainer of Peggy (@hildjj), this grammar is backwards-compatible with PEG.js, and includes some new features. See https://github.com/peggyjs/peggy/pull/544#issuecomment-2315503837 and https://github.com/peggyjs/peggy/pull/544#issuecomment-2315524798.

I didn't replace the old grammar submodule since it seems to be a special case, providing syntaxes for multiple languages.

Checklist: