1
0
Fork 0
mirror of https://github.com/helix-editor/helix synced 2024-05-21 04:06:06 +02:00

chore: update tree-sitter-rust to v0.21.0 (#10365)

* chore: update tree-sitter-rust to 0.21.0

* fix: pretty print and textobject tests
This commit is contained in:
Pedro Fedricci 2024-04-15 13:07:15 -03:00 committed by GitHub
parent 1245760595
commit 0546273570
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 7 deletions

View File

@ -2765,10 +2765,10 @@ fn test_textobject_queries() {
) )
}; };
test("quantified_nodes", 1..36); test("quantified_nodes", 1..37);
// NOTE: Enable after implementing proper node group capturing // NOTE: Enable after implementing proper node group capturing
// test("quantified_nodes_grouped", 1..36); // test("quantified_nodes_grouped", 1..37);
// test("multiple_nodes_grouped", 1..36); // test("multiple_nodes_grouped", 1..37);
} }
#[test] #[test]
@ -2939,7 +2939,7 @@ fn assert_pretty_print(
#[test] #[test]
fn test_pretty_print() { fn test_pretty_print() {
let source = r#"/// Hello"#; let source = r#"// Hello"#;
assert_pretty_print("rust", source, "(line_comment)", 0, source.len()); assert_pretty_print("rust", source, "(line_comment)", 0, source.len());
// A large tree should be indented with fields: // A large tree should be indented with fields:
@ -2958,7 +2958,8 @@ fn test_pretty_print() {
" (macro_invocation\n", " (macro_invocation\n",
" macro: (identifier)\n", " macro: (identifier)\n",
" (token_tree\n", " (token_tree\n",
" (string_literal))))))", " (string_literal\n",
" (string_content)))))))",
), ),
0, 0,
source.len(), source.len(),

View File

@ -250,7 +250,7 @@ args = { attachCommands = [ "platform select remote-gdb-server", "platform conne
[[grammar]] [[grammar]]
name = "rust" name = "rust"
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "0431a2c60828731f27491ee9fdefe25e250ce9c9" } source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "473634230435c18033384bebaa6d6a17c2523281" }
[[language]] [[language]]
name = "sway" name = "sway"

View File

@ -51,7 +51,7 @@
(lifetime (lifetime
"'" @label "'" @label
(identifier) @label) (identifier) @label)
(loop_label (label
"'" @label "'" @label
(identifier) @label) (identifier) @label)