aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/treesitter.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/treesitter.txt')
-rw-r--r--runtime/doc/treesitter.txt14
1 files changed, 6 insertions, 8 deletions
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index 08dc0583ac..8f7241dd46 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -421,9 +421,9 @@ get_node_text({node}, {source}) *get_node_text()*
Gets the text corresponding to a given node
Parameters: ~
- {node} the node
- {bsource} The buffer or string from which the node is
- extracted
+ {node} the node
+ {source} The buffer or string from which the node is
+ extracted
get_query({lang}, {query_name}) *get_query()*
Returns the runtime query {query_name} for {lang}.
@@ -530,11 +530,9 @@ Query:iter_matches({self}, {node}, {source}, {start}, {stop})
for id, node in pairs(match) do
local name = query.captures[id]
-- `node` was captured by the `name` capture in the match
-<
->
- local node_data = metadata[id] -- Node level metadata
-<
->
+
+ local node_data = metadata[id] -- Node level metadata
+
... use the info here ...
end
end