The query command is used to run a query on a parser, and view the results.
tree-sitter query [OPTIONS] <QUERY_PATH> [PATHS]... # Aliases: qThe path to the directory containing the grammar.
Print the time taken to execute the query on the file.
Suppress main output.
The path to a file that contains paths to source files in which the query will be executed.
The range of byte offsets in which the query will be executed. The format is start_byte:end_byte.
The range of rows in which the query will be executed. The format is start_row:end_row.
The language scope to use for parsing and querying. This is useful when the language is ambiguous.
Order the query results by captures instead of matches.
Whether to run query tests or not.
The path to an alternative configuration (config.json) file. See the init-config command for more information.
Query the contents of a specific test.