Skip to content

Commit dc31713

Browse files
author
Marlon Costa
committed
build(deps): Update tree-sitter to 0.26.3 and related dependencies
Update major dependencies: - tree-sitter: 0.25.3 -> 0.26.3 - tree-sitter-javascript: 0.23.1 -> 0.25.0 - tree-sitter-python: 0.23.6 -> 0.25.0 - tree-sitter-rust: 0.23.2 -> 0.24.0 - askama: 0.14 -> 0.15 Also update tree-sitter version in all subcrates. Regenerate language enums to match new grammar versions. Fix tree-sitter API change: Node.child() now takes u32 instead of usize.
1 parent 2dfadae commit dc31713

File tree

18 files changed

+781
-765
lines changed

18 files changed

+781
-765
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ serde = { version = "^1.0", features = ["derive"] }
2424
termcolor = "^1.2"
2525
walkdir = "^2.3"
2626

27-
tree-sitter = "=0.25.3"
27+
tree-sitter = "=0.26.3"
2828
tree-sitter-java = "=0.23.5"
2929
tree-sitter-kotlin-ng = "1.1.0"
3030
tree-sitter-typescript = "=0.23.2"
31-
tree-sitter-javascript = "=0.23.1"
32-
tree-sitter-python = "=0.23.6"
33-
tree-sitter-rust = "=0.23.2"
31+
tree-sitter-javascript = "=0.25.0"
32+
tree-sitter-python = "=0.25.0"
33+
tree-sitter-rust = "=0.24.0"
3434
tree-sitter-preproc = { path = "./tree-sitter-preproc", version = "=0.20.3" }
3535
tree-sitter-ccomment = { path = "./tree-sitter-ccomment", version = "=0.20.3" }
3636
tree-sitter-mozcpp = { path = "./tree-sitter-mozcpp", version = "=0.20.4" }

enums/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ edition = "2024"
66

77
[dependencies]
88
clap = { version = "^4.0", features = ["derive"] }
9-
askama = "^0.14"
9+
askama = "^0.15"
1010

11-
tree-sitter = "=0.25.3"
11+
tree-sitter = "=0.26.3"
1212
tree-sitter-java = "=0.23.5"
1313
tree-sitter-kotlin-ng = "1.1.0"
1414
tree-sitter-typescript = "=0.23.2"
15-
tree-sitter-javascript = "=0.23.1"
16-
tree-sitter-python = "=0.23.6"
17-
tree-sitter-rust = "=0.23.2"
15+
tree-sitter-javascript = "=0.25.0"
16+
tree-sitter-python = "=0.25.0"
17+
tree-sitter-rust = "=0.24.0"
1818
tree-sitter-preproc = { path = "../tree-sitter-preproc", version = "=0.20.3" }
1919
tree-sitter-ccomment = { path = "../tree-sitter-ccomment", version = "=0.20.3" }
2020
tree-sitter-mozcpp = { path = "../tree-sitter-mozcpp", version = "=0.20.4" }

src/languages/language_ccomment.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub enum Ccomment {
2121
TranslationUnitRepeat1 = 14,
2222
DefineRepeat1 = 15,
2323
Error = 16,
24+
2425
}
2526

2627
impl From<Ccomment> for &'static str {
@@ -44,6 +45,7 @@ impl From<Ccomment> for &'static str {
4445
Ccomment::TranslationUnitRepeat1 => "translation_unit_repeat1",
4546
Ccomment::DefineRepeat1 => "define_repeat1",
4647
Ccomment::Error => "ERROR",
48+
4749
}
4850
}
4951
}

src/languages/language_cpp.rs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ pub enum Cpp {
643643
StatementIdentifier = 636,
644644
TypeIdentifier = 637,
645645
Error = 638,
646+
646647
}
647648

648649
impl From<Cpp> for &'static str {
@@ -908,9 +909,7 @@ impl From<Cpp> for &'static str {
908909
Cpp::MOZHEAPALLOCATOR => "MOZ_HEAP_ALLOCATOR",
909910
Cpp::MOZHEAPCLASS => "MOZ_HEAP_CLASS",
910911
Cpp::MOZIMPLICIT => "MOZ_IMPLICIT",
911-
Cpp::MOZINHERITTYPEANNOTATIONSFROMTEMPLATEARGS => {
912-
"MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS"
913-
}
912+
Cpp::MOZINHERITTYPEANNOTATIONSFROMTEMPLATEARGS => "MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS",
914913
Cpp::MOZINITOUTSIDECTOR => "MOZ_INIT_OUTSIDE_CTOR",
915914
Cpp::MOZISCLASSINIT => "MOZ_IS_CLASS_INIT",
916915
Cpp::MOZISREFPTR => "MOZ_IS_REFPTR",
@@ -941,17 +940,11 @@ impl From<Cpp> for &'static str {
941940
Cpp::MOZNODANGLINGONTEMPORARIES => "MOZ_NO_DANGLING_ON_TEMPORARIES",
942941
Cpp::MOZNOSANITIZESIGNEDOVERFLOW => "MOZ_NO_SANITIZE_SIGNED_OVERFLOW",
943942
Cpp::MOZNOSANITIZEUNSIGNEDOVERFLOW => "MOZ_NO_SANITIZE_UNSIGNED_OVERFLOW",
944-
Cpp::MOZONLYUSEDTOAVOIDSTATICCONSTRUCTORS => {
945-
"MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS"
946-
}
943+
Cpp::MOZONLYUSEDTOAVOIDSTATICCONSTRUCTORS => "MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS",
947944
Cpp::MOZOWNINGREF => "MOZ_OWNING_REF",
948-
Cpp::MOZPOPDISABLENONTRIVIALUNIONWARNINGS => {
949-
"MOZ_POP_DISABLE_NONTRIVIAL_UNION_WARNINGS"
950-
}
945+
Cpp::MOZPOPDISABLENONTRIVIALUNIONWARNINGS => "MOZ_POP_DISABLE_NONTRIVIAL_UNION_WARNINGS",
951946
Cpp::MOZPRETENDNORETURNFORSTATICANALYSIS => "MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS",
952-
Cpp::MOZPUSHDISABLENONTRIVIALUNIONWARNINGS => {
953-
"MOZ_PUSH_DISABLE_NONTRIVIAL_UNION_WARNINGS"
954-
}
947+
Cpp::MOZPUSHDISABLENONTRIVIALUNIONWARNINGS => "MOZ_PUSH_DISABLE_NONTRIVIAL_UNION_WARNINGS",
955948
Cpp::MOZRAII => "MOZ_RAII",
956949
Cpp::MOZREQUIREDBASEMETHOD => "MOZ_REQUIRED_BASE_METHOD",
957950
Cpp::MOZSTACKCLASS => "MOZ_STACK_CLASS",
@@ -1243,13 +1236,9 @@ impl From<Cpp> for &'static str {
12431236
Cpp::TranslationUnitRepeat1 => "translation_unit_repeat1",
12441237
Cpp::PreprocParamsRepeat1 => "preproc_params_repeat1",
12451238
Cpp::PreprocIfRepeat1 => "preproc_if_repeat1",
1246-
Cpp::PreprocIfInFieldDeclarationListRepeat1 => {
1247-
"preproc_if_in_field_declaration_list_repeat1"
1248-
}
1239+
Cpp::PreprocIfInFieldDeclarationListRepeat1 => "preproc_if_in_field_declaration_list_repeat1",
12491240
Cpp::PreprocIfInEnumeratorListRepeat1 => "preproc_if_in_enumerator_list_repeat1",
1250-
Cpp::PreprocIfInEnumeratorListNoCommaRepeat1 => {
1251-
"preproc_if_in_enumerator_list_no_comma_repeat1"
1252-
}
1241+
Cpp::PreprocIfInEnumeratorListNoCommaRepeat1 => "preproc_if_in_enumerator_list_no_comma_repeat1",
12531242
Cpp::PreprocArgumentListRepeat1 => "preproc_argument_list_repeat1",
12541243
Cpp::DeclarationRepeat1 => "declaration_repeat1",
12551244
Cpp::TypeDefinitionRepeat1 => "type_definition_repeat1",
@@ -1300,6 +1289,7 @@ impl From<Cpp> for &'static str {
13001289
Cpp::StatementIdentifier => "statement_identifier",
13011290
Cpp::TypeIdentifier => "type_identifier",
13021291
Cpp::Error => "ERROR",
1292+
13031293
}
13041294
}
13051295
}

src/languages/language_java.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ pub enum Java {
326326
ReceiverParameterRepeat1 = 319,
327327
TypeIdentifier = 320,
328328
Error = 321,
329+
329330
}
330331

331332
impl From<Java> for &'static str {
@@ -654,6 +655,7 @@ impl From<Java> for &'static str {
654655
Java::ReceiverParameterRepeat1 => "receiver_parameter_repeat1",
655656
Java::TypeIdentifier => "type_identifier",
656657
Java::Error => "ERROR",
658+
657659
}
658660
}
659661
}

0 commit comments

Comments
 (0)