Skip to content

Commit 2eca24d

Browse files
ups
1 parent ce2f679 commit 2eca24d

File tree

1 file changed

+5
-5
lines changed
  • crates/pgt_treesitter/src/context

1 file changed

+5
-5
lines changed

crates/pgt_treesitter/src/context/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ impl<'a> TreesitterContext<'a> {
620620
/// Verifies whether the node_under_cursor has the passed in ancestors in the right order.
621621
/// Note that you need to pass in the ancestors in the order as they would appear in the tree:
622622
///
623-
/// If the tree shows `relation > object_reference > any_any_identifier` and the "any_any_identifier" is a leaf node,
623+
/// If the tree shows `relation > object_reference > any_identifier` and the "any_identifier" is a leaf node,
624624
/// you need to pass `&["relation", "object_reference"]`.
625625
pub fn matches_ancestor_history(&self, expected_ancestors: &[&'static str]) -> bool {
626626
self.node_under_cursor.as_ref().is_some_and(|node| {
@@ -642,7 +642,7 @@ impl<'a> TreesitterContext<'a> {
642642
/// Verifies whether the node_under_cursor has the passed in ancestors in the right order.
643643
/// Note that you need to pass in the ancestors in the order as they would appear in the tree:
644644
///
645-
/// If the tree shows `relation > object_reference > any_any_identifier` and the "any_any_identifier" is a leaf node,
645+
/// If the tree shows `relation > object_reference > any_identifier` and the "any_identifier" is a leaf node,
646646
/// you need to pass `&["relation", "object_reference"]`.
647647
pub fn matches_one_of_ancestors(&self, expected_ancestors: &[&'static str]) -> bool {
648648
self.node_under_cursor.as_ref().is_some_and(|node| {
@@ -663,9 +663,9 @@ impl<'a> TreesitterContext<'a> {
663663
/// * keyword_from [9..13] 'from'
664664
/// * relation [14..28] '"auth"."users"'
665665
/// * object_reference [14..28] '"auth"."users"'
666-
/// * any_any_identifier [14..20] '"auth"'
666+
/// * any_identifier [14..20] '"auth"'
667667
/// * . [20..21] '.'
668-
/// * any_any_identifier [21..28] '"users"'
668+
/// * any_identifier [21..28] '"users"'
669669
/// */
670670
///
671671
/// if node_under_cursor_is_nth_child(1) {
@@ -1138,7 +1138,7 @@ mod tests {
11381138
any_identifier [40..43] '@id'
11391139
@ [40..41] '@'
11401140
1141-
You can see that the '@' is a child of the "any_any_identifier" but has a range smaller than its parent's.
1141+
You can see that the '@' is a child of the "any_identifier" but has a range smaller than its parent's.
11421142
This would crash our context parsing because, at position 42, we weren't at the leaf node but also couldn't
11431143
go to a child on that position.
11441144
*/

0 commit comments

Comments
 (0)