Skip to content

Commit

Permalink
Change PEG.js to use Peggy grammar (#7018)
Browse files Browse the repository at this point in the history
* Switch PEG.js TM Scope to `source.peggy`

* Add missing license

* Re-gen grammar list

---------

Co-authored-by: Colin Seymour <colin@github.com>
  • Loading branch information
spenserblack and lildude authored Aug 29, 2024
1 parent 0523920 commit c0d3f3b
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@
[submodule "vendor/grammars/cmake.tmbundle"]
path = vendor/grammars/cmake.tmbundle
url = https://github.com/textmate/cmake.tmbundle
[submodule "vendor/grammars/code-peggy-language"]
path = vendor/grammars/code-peggy-language
url = https://github.com/peggyjs/code-peggy-language.git
[submodule "vendor/grammars/common-lisp-tmlanguage"]
path = vendor/grammars/common-lisp-tmlanguage
url = https://github.com/qingpeng9802/common-lisp-tmlanguage.git
Expand Down
3 changes: 3 additions & 0 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ vendor/grammars/clarity.tmbundle:
vendor/grammars/cmake.tmbundle:
- source.cache.cmake
- source.cmake
vendor/grammars/code-peggy-language:
- inline.peggy
- source.peggy
vendor/grammars/common-lisp-tmlanguage:
- markdown.commonlisp.codeblock
- source.commonlisp
Expand Down
2 changes: 1 addition & 1 deletion lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5163,7 +5163,7 @@ PEG.js:
extensions:
- ".pegjs"
- ".peggy"
tm_scope: source.pegjs
tm_scope: source.peggy
ace_mode: javascript
codemirror_mode: javascript
codemirror_mime_type: text/javascript
Expand Down
2 changes: 1 addition & 1 deletion vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **Oz:** [eregon/oz-tmbundle](https://github.com/eregon/oz-tmbundle)
- **P4:** [TakeshiTseng/atom-language-p4](https://github.com/TakeshiTseng/atom-language-p4)
- **PDDL:** [jan-dolejsi/vscode-pddl](https://github.com/jan-dolejsi/vscode-pddl)
- **PEG.js:** [Alhadis/language-grammars](https://github.com/Alhadis/language-grammars)
- **PEG.js:** [peggyjs/code-peggy-language](https://github.com/peggyjs/code-peggy-language)
- **PHP:** [tree-sitter/tree-sitter-php](https://github.com/tree-sitter/tree-sitter-php) 🐌
- **PLpgSQL:** [textmate/sql.tmbundle](https://github.com/textmate/sql.tmbundle)
- **POV-Ray SDL:** [c-lipka/language-povray](https://github.com/c-lipka/language-povray)
Expand Down
1 change: 1 addition & 0 deletions vendor/grammars/code-peggy-language
Submodule code-peggy-language added at 64d03a
44 changes: 44 additions & 0 deletions vendor/licenses/git_submodule/code-peggy-language.dep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: code-peggy-language
version: 64d03aca228ce39383064141633a5dac6543dbde
type: git_submodule
homepage: https://github.com/peggyjs/code-peggy-language.git
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2020 Tobias Kahlert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices:
- sources: AUTHORS
text: |-
# Original Author:
Tobias Kahlert <code.databyte@gmail.com> (https://github.com/SrTobi/)
# Current maintainer:
Joe Hildebrand <joe-github@cursive.net> (https://github.com/hildjj/)
# Contributors
Sven Slootweg <admin@cryto.net> (https://github.com/joepie91/)
yy0931 (https://github.com/yy0931)
Rene Saarsoo <nene@triin.net> (https://github.com/nene/)
Lionel Rowe (https://github.com/lionel-rowe/)

0 comments on commit c0d3f3b

Please sign in to comment.