Whether `node`'s text is longer than `units` UTF-16 units, which is how tree-sitter.ts measures it. The bytes settle it without a count unless they are between one and three times as many.
(&self, node: Node<'t>, units: usize)
| 1164 | /// tree-sitter.ts measures it. The bytes settle it without a count unless |
| 1165 | /// they are between one and three times as many. |
| 1166 | fn longer_than_units(&self, node: Node<'t>, units: usize) -> bool { |
| 1167 | let bytes = node.end_byte() - node.start_byte(); |
| 1168 | if bytes <= units { |
| 1169 | return false; |
| 1170 | } |
| 1171 | bytes > units * 3 || util::utf16_len(self.text(node)) > units |
| 1172 | } |
| 1173 | |
| 1174 | /// `holders` are the members between the owner and `obj` that have no node |
| 1175 | /// yet, outermost first: each holds the literal the next is written in. The |
no test coverage detected