Skip to content

Commit

Permalink
chore(grammars): Update grammars (#802)
Browse files Browse the repository at this point in the history
* chore(grammars): Update grammars

* fix(grammars): Add PHP subdirectory

The updates to the PHP grammar seem to have added two grammar dialects
for PHP. This updates the build script to select the (seemingly) more
full-featured one.
  • Loading branch information
afnanenayet authored Jan 14, 2024
1 parent e4f22f9 commit 494d0cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ fn grammars() -> Vec<GrammarCompileInfo<'static>> {
},
GrammarCompileInfo {
display_name: "php",
path: PathBuf::from("grammars/tree-sitter-php"),
path: PathBuf::from("grammars/tree-sitter-php/php"),
c_sources: vec!["parser.c", "scanner.c"],
..Default::default()
},
Expand Down
2 changes: 1 addition & 1 deletion grammars/tree-sitter-php
Submodule tree-sitter-php updated 49 files
+3 −0 .github/workflows/ci.yml
+15 −1 .gitignore
+0 −68 Cargo.lock
+5 −6 Makefile
+5 −15 Package.swift
+5 −3 binding.gyp
+20 −11 bindings/node/binding.cc
+2 −1 bindings/node/index.js
+1 −0 bindings/node/php.js
+1 −0 bindings/node/php_only.js
+1 −0 bindings/swift/TreeSitterPHP/php.h
+1,594 −0 common/define-grammar.js
+5 −5 common/scanner.h
+1 −0 common/test/common
+0 −0 common/test/corpus/bugs.txt
+0 −0 common/test/corpus/class.txt
+8 −8 common/test/corpus/declarations.txt
+0 −0 common/test/corpus/execution_operator.txt
+7 −22 common/test/corpus/expressions.txt
+6 −6 common/test/corpus/literals.txt
+1 −49 common/test/corpus/statements.txt
+0 −0 common/test/corpus/string.txt
+0 −0 common/test/corpus/types.txt
+2 −0 examples/.gitignore
+0 −1,572 grammar.js
+14 −7 package.json
+3 −0 php/grammar.js
+3 −0 php/package.json
+1 −1 php/src/grammar.json
+12 −0 php/src/node-types.json
+19,436 −19,416 php/src/parser.c
+17 −0 php/src/scanner.c
+0 −0 php/src/tree_sitter/parser.h
+1 −0 php/test/corpus/common
+48 −1 php/test/corpus/interpolation.txt
+3 −0 php_only/grammar.js
+11 −0 php_only/package.json
+9,032 −0 php_only/src/grammar.json
+5,629 −0 php_only/src/node-types.json
+130,569 −0 php_only/src/parser.c
+17 −0 php_only/src/scanner.c
+224 −0 php_only/src/tree_sitter/parser.h
+1 −0 php_only/test/corpus/common
+59 −0 php_only/test/corpus/php_only.txt
+10 −1 php_only/test/highlight/keywords.php
+0 −0 php_only/test/highlight/literals.php
+0 −0 php_only/test/highlight/types.php
+1 −0 queries/highlights.scm
+11 −0 queries/injections.scm

0 comments on commit 494d0cf

Please # to comment.