@@ -489,7 +489,7 @@ impl Language {
489489 }
490490 }
491491
492- /// Get a list of all subtype symbol names for a given supertype symbol.
492+ /// Get a list of all subtype symbols for a given supertype symbol.
493493 #[ doc( alias = "ts_language_supertype_map" ) ]
494494 #[ must_use]
495495 pub fn subtypes_for_supertype ( & self , supertype : u16 ) -> & [ u16 ] {
@@ -553,7 +553,7 @@ impl Language {
553553 unsafe { ffi:: ts_language_field_count ( self . 0 ) as usize }
554554 }
555555
556- /// Get the field names for the given numerical id.
556+ /// Get the field name for the given numerical id.
557557 #[ doc( alias = "ts_language_field_name_for_id" ) ]
558558 #[ must_use]
559559 pub fn field_name_for_id ( & self , field_id : u16 ) -> Option < & ' static str > {
@@ -599,7 +599,7 @@ impl Language {
599599 /// symbol from [`LookaheadIterator::current_symbol`].
600600 ///
601601 /// Lookahead iterators can be useful to generate suggestions and improve
602- /// syntax error diagnostics. To get symbols valid in an ERROR node, use the
602+ /// syntax error diagnostics. To get symbols valid in an ` ERROR` node, use the
603603 /// lookahead iterator on its first leaf node state. For `MISSING` nodes, a
604604 /// lookahead iterator created on the previous non-extra leaf node may be
605605 /// appropriate.
@@ -691,7 +691,7 @@ impl Parser {
691691 unsafe { logger. payload . cast :: < Logger > ( ) . as_ref ( ) }
692692 }
693693
694- /// Set the logging callback that a parser should use during parsing.
694+ /// Set the logging callback that the parser should use during parsing.
695695 #[ doc( alias = "ts_parser_set_logger" ) ]
696696 pub fn set_logger ( & mut self , logger : Option < Logger > ) {
697697 let prev_logger = unsafe { ffi:: ts_parser_logger ( self . 0 . as_ptr ( ) ) } ;
@@ -1643,7 +1643,7 @@ impl<'tree> Node<'tree> {
16431643
16441644 /// Check if this node is *extra*.
16451645 ///
1646- /// Extra nodes represent things like comments, which are not required the
1646+ /// Extra nodes represent things like comments, which are not required by the
16471647 /// grammar, but can appear anywhere.
16481648 #[ doc( alias = "ts_node_is_extra" ) ]
16491649 #[ must_use]
@@ -1700,14 +1700,14 @@ impl<'tree> Node<'tree> {
17001700 unsafe { ffi:: ts_node_is_missing ( self . 0 ) }
17011701 }
17021702
1703- /// Get the byte offsets where this node starts.
1703+ /// Get the byte offset where this node starts.
17041704 #[ doc( alias = "ts_node_start_byte" ) ]
17051705 #[ must_use]
17061706 pub fn start_byte ( & self ) -> usize {
17071707 unsafe { ffi:: ts_node_start_byte ( self . 0 ) as usize }
17081708 }
17091709
1710- /// Get the byte offsets where this node end .
1710+ /// Get the byte offset where this node ends .
17111711 #[ doc( alias = "ts_node_end_byte" ) ]
17121712 #[ must_use]
17131713 pub fn end_byte ( & self ) -> usize {
@@ -1982,14 +1982,14 @@ impl<'tree> Node<'tree> {
19821982 Self :: new ( unsafe { ffi:: ts_node_prev_named_sibling ( self . 0 ) } )
19831983 }
19841984
1985- /// Get the node's first child that contains or starts after the given byte offset.
1985+ /// Get this node's first child that contains or starts after the given byte offset.
19861986 #[ doc( alias = "ts_node_first_child_for_byte" ) ]
19871987 #[ must_use]
19881988 pub fn first_child_for_byte ( & self , byte : usize ) -> Option < Self > {
19891989 Self :: new ( unsafe { ffi:: ts_node_first_child_for_byte ( self . 0 , byte as u32 ) } )
19901990 }
19911991
1992- /// Get the node's first named child that contains or starts after the given byte offset.
1992+ /// Get this node's first named child that contains or starts after the given byte offset.
19931993 #[ doc( alias = "ts_node_first_named_child_for_point" ) ]
19941994 #[ must_use]
19951995 pub fn first_named_child_for_byte ( & self , byte : usize ) -> Option < Self > {
@@ -2003,7 +2003,7 @@ impl<'tree> Node<'tree> {
20032003 unsafe { ffi:: ts_node_descendant_count ( self . 0 ) as usize }
20042004 }
20052005
2006- /// Get the smallest node within this node that spans the given range.
2006+ /// Get the smallest node within this node that spans the given byte range.
20072007 #[ doc( alias = "ts_node_descendant_for_byte_range" ) ]
20082008 #[ must_use]
20092009 pub fn descendant_for_byte_range ( & self , start : usize , end : usize ) -> Option < Self > {
@@ -2012,7 +2012,7 @@ impl<'tree> Node<'tree> {
20122012 } )
20132013 }
20142014
2015- /// Get the smallest named node within this node that spans the given range.
2015+ /// Get the smallest named node within this node that spans the given byte range.
20162016 #[ doc( alias = "ts_node_named_descendant_for_byte_range" ) ]
20172017 #[ must_use]
20182018 pub fn named_descendant_for_byte_range ( & self , start : usize , end : usize ) -> Option < Self > {
@@ -2021,7 +2021,7 @@ impl<'tree> Node<'tree> {
20212021 } )
20222022 }
20232023
2024- /// Get the smallest node within this node that spans the given range.
2024+ /// Get the smallest node within this node that spans the given point range.
20252025 #[ doc( alias = "ts_node_descendant_for_point_range" ) ]
20262026 #[ must_use]
20272027 pub fn descendant_for_point_range ( & self , start : Point , end : Point ) -> Option < Self > {
@@ -2030,7 +2030,7 @@ impl<'tree> Node<'tree> {
20302030 } )
20312031 }
20322032
2033- /// Get the smallest named node within this node that spans the given range.
2033+ /// Get the smallest named node within this node that spans the given point range.
20342034 #[ doc( alias = "ts_node_named_descendant_for_point_range" ) ]
20352035 #[ must_use]
20362036 pub fn named_descendant_for_point_range ( & self , start : Point , end : Point ) -> Option < Self > {
@@ -2039,6 +2039,7 @@ impl<'tree> Node<'tree> {
20392039 } )
20402040 }
20412041
2042+ /// Get an S-expression representing the node.
20422043 #[ doc( alias = "ts_node_string" ) ]
20432044 #[ must_use]
20442045 pub fn to_sexp ( & self ) -> String {
0 commit comments