content returns the source for the provided tree-sitter node, checking if the node is nil first.
(n *sitter.Node, source []byte)
| 499 | // content returns the source for the provided tree-sitter |
| 500 | // node, checking if the node is nil first. |
| 501 | func content(n *sitter.Node, source []byte) string { |
| 502 | if n == nil { |
| 503 | return "" |
| 504 | } |
| 505 | return n.Content(source) |
| 506 | } |
| 507 | |
| 508 | // PrintTree returns a string representation of the syntax tree |
| 509 | // for the provided JavaScript source |