tree-sitter / node-tree-sitter

Node.js bindings for tree-sitter
https://www.npmjs.com/package/tree-sitter
MIT License
649 stars 114 forks source link

[demo request] Is there any demo for using query-syntax #Capturing Nodes? #221

Open liaodalin19903 opened 2 months ago

liaodalin19903 commented 2 months ago

Hi, I am read the document of tree-sitter: query-syntax #Capturing Nodes

there use @ to capture the nodes:

 (assignment_expression
  left: (identifier) @the-function-name
  right: (function))

but I don't find a place of use the captured node name(in there @the-function-name) , is there any demo for using this function?