Skip to content

Commit

Permalink
Update grammars to 0.20 (#954)
Browse files Browse the repository at this point in the history
* enums: Update grammars to 0.20

* Update grammars to 0.20

* Use new Java grammar tokens

* loc: Semicolon not a statement for JavaScript

* Update snapshot repository with new grammar values
  • Loading branch information
Luni-4 authored Dec 20, 2022
1 parent 70f5f46 commit ba8345f
Show file tree
Hide file tree
Showing 16 changed files with 854 additions and 796 deletions.
54 changes: 22 additions & 32 deletions Cargo.lock

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

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ serde = { version = "^1.0", features = ["derive"] }
termcolor = "^1.1"
walkdir = "^2.3"

tree-sitter = ">= 0.19, < 0.21"
tree-sitter-java = "=0.19.0"
tree-sitter = ">= 0.20, < 0.21"
tree-sitter-java = "=0.20.0"
tree-sitter-typescript = "=0.20.0"
tree-sitter-javascript = "=0.19.0"
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-javascript = "=0.20.0"
tree-sitter-python = "=0.20.0"
tree-sitter-rust = "=0.20.0"
tree-sitter-preproc = { path = "./tree-sitter-preproc", version = "=0.20.0" }
tree-sitter-ccomment = { path = "./tree-sitter-ccomment", version = "=0.20.0" }
tree-sitter-mozcpp = { path = "./tree-sitter-mozcpp", version = "=0.20.1" }
tree-sitter-mozjs = { path = "./tree-sitter-mozjs", version = "=0.19.0" }
tree-sitter-mozjs = { path = "./tree-sitter-mozjs", version = "=0.20.0" }

[dev-dependencies]
insta = { version = "1.22.0", features = ["yaml"] }
Expand Down
54 changes: 22 additions & 32 deletions enums/Cargo.lock

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

16 changes: 8 additions & 8 deletions enums/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ edition = "2021"
clap = { version = "^3.2", features = ["derive"] }
askama = "^0.11"

tree-sitter = ">= 0.19, < 0.21"
tree-sitter-java = "=0.19.0"
tree-sitter = ">= 0.20, < 0.21"
tree-sitter-java = "=0.20.0"
tree-sitter-typescript = "=0.20.0"
tree-sitter-javascript = "=0.19.0"
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-javascript = "=0.20.0"
tree-sitter-python = "=0.20.0"
tree-sitter-rust = "=0.20.0"
tree-sitter-preproc = { path = "../tree-sitter-preproc", version = "=0.20.0" }
tree-sitter-ccomment = { path = "../tree-sitter-ccomment", version = "=0.20.0" }
tree-sitter-mozcpp = { path = "../tree-sitter-mozcpp", version = "=0.20.1" }
tree-sitter-mozjs = { path = "../tree-sitter-mozjs", version = "=0.19.0" }
tree-sitter-mozjs = { path = "../tree-sitter-mozjs", version = "=0.20.0" }

[profile.release]
strip = "debuginfo"
2 changes: 1 addition & 1 deletion src/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl Checker for PythonCode {
}

impl Checker for JavaCode {
mk_checker!(is_comment, Comment);
mk_checker!(is_comment, LineComment, BlockComment);
mk_checker!(is_string, StringLiteral);
mk_checker!(is_call, MethodInvocation);
mk_checker!(is_func, MethodDeclaration, ConstructorDeclaration);
Expand Down
Loading

0 comments on commit ba8345f

Please sign in to comment.