Skip to content

Commit

Permalink
Update tree-sitter-mozcpp to 0.20 (#754)
Browse files Browse the repository at this point in the history
* Pick first grep occurrence

* enums: Update tree-sitter deps

* Update tree-sitter-mozcpp

* Fix grammar enums

* Update mozcpp grammar to 0.20

* Add loc test for namespace
  • Loading branch information
Luni-4 authored Jan 12, 2022
1 parent 1c3c663 commit 73f5e1d
Show file tree
Hide file tree
Showing 14 changed files with 348,513 additions and 375,681 deletions.
38 changes: 24 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tree-sitter-python = "=0.19.0"
tree-sitter-rust = "=0.19.0"
tree-sitter-preproc = { path = "./tree-sitter-preproc", version = "=0.19.0" }
tree-sitter-ccomment = { path = "./tree-sitter-ccomment", version = "=0.19.0" }
tree-sitter-mozcpp = { path = "./tree-sitter-mozcpp", version = "=0.19.5" }
tree-sitter-mozcpp = { path = "./tree-sitter-mozcpp", version = "=0.20.0" }
tree-sitter-mozjs = { path = "./tree-sitter-mozjs", version = "=0.19.0" }

[dev-dependencies]
Expand Down
38 changes: 24 additions & 14 deletions enums/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion enums/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ tree-sitter-python = "=0.19.0"
tree-sitter-rust = "=0.19.0"
tree-sitter-preproc = { path = "../tree-sitter-preproc", version = "=0.19.0" }
tree-sitter-ccomment = { path = "../tree-sitter-ccomment", version = "=0.19.0" }
tree-sitter-mozcpp = { path = "../tree-sitter-mozcpp", version = "=0.19.5" }
tree-sitter-mozcpp = { path = "../tree-sitter-mozcpp", version = "=0.20.0" }
tree-sitter-mozjs = { path = "../tree-sitter-mozjs", version = "=0.19.0" }
2 changes: 1 addition & 1 deletion generate-grammars/generate-mozcpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TS_CPP_CRATE="tree-sitter-cpp"
JSON_CRATE_FILENAME=".cargo_vcs_info.json"

# Get the current tree-sitter-cpp crate version from the tree-sitter-mozcpp grammar
TS_CPP_VERSION=`grep $TS_CPP_CRATE tree-sitter-mozcpp/Cargo.toml | cut -f2 -d "," | cut -f2 -d "=" | tr -d ' ' | tr -d } | tr -d \"`
TS_CPP_VERSION=`grep -m 1 $TS_CPP_CRATE tree-sitter-mozcpp/Cargo.toml | cut -f2 -d "," | cut -f2 -d "=" | tr -d ' ' | tr -d } | tr -d \"`

# Name assigned to the compressed binary crate downloaded from crates.io
CRATE_OUTPUT="$TS_CPP_CRATE-download.gz"
Expand Down
3 changes: 1 addition & 2 deletions src/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ impl Checker for CppCode {
FunctionDefinition,
FunctionDefinition2,
FunctionDefinition3,
FunctionDefinition4,
FunctionDefinitionRepeat1
FunctionDefinition4
);
mk_checker!(is_closure, LambdaExpression);
mk_checker!(
Expand Down
3 changes: 1 addition & 2 deletions src/getter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,9 @@ impl Getter for CppCode {
}) {
if let Some(first) = fd.object().child(0) {
match first.kind_id().into() {
Cpp::ScopedIdentifier
Cpp::TypeIdentifier
| Cpp::Identifier
| Cpp::FieldIdentifier
| Cpp::ScopedFieldIdentifier
| Cpp::DestructorName
| Cpp::OperatorName
| Cpp::TemplateFunction
Expand Down
Loading

0 comments on commit 73f5e1d

Please sign in to comment.