Package index
About ts
- See ‘About ts’ for an overview of ts.
- If you want to edit a document start at
ts_tree_new()andts_tree_select(). - For more see the sections below.
-
ts_list_parsers() - List installed tree-sitter parsers
-
ts_tree_new() - Create tree-sitter tree from file or string
-
ts_tree_select() - Select elements of a tree-sitter tree
-
ts_tree_delete() - Delete selected elements from a tree-sitter tree
-
ts_tree_format() - Format the selected elements of a tree sitter tree for printing
-
ts_tree_insert() - Insert a new element into a tree-sitter tree
-
ts_tree_update() - Replace selected elements with a new element in a tree-sitter tree
Manipulation
Another way to edit a tree-sitter tree is “in place”, using the ts_tre_select<-() replacement function or the [[<- replacement operator.
-
`ts_tree_select<-`() - Edit parts of a tree-sitter tree
-
`[[<-`(<ts_tree>) - Edit parts of a tree-sitter tree
-
print(<ts_tree>) - Print a tree-sitter tree
-
format(<ts_tree>) - Format tree-sitter trees
-
`[[`(<ts_tree>) - Unserialize parts of a tree-sitter tree
-
ts_tree_unserialize() - Unserialize selected elements of a tree-sitter tree
-
ts_tree_write() - Write a tree-sitter tree to a file
-
`[`(<ts_tree>) - Convert ts_tree object to a data frame
-
ts_tree_ast() - Show the annotated syntax tree of a tree-sitter tree
-
ts_tree_dom() - Print the document object model (DOM) of a tree-sitter tree
-
ts_tree_query() - Run tree-sitter queries on tree-sitter trees
-
ts_tree_sexpr() - Show the syntax tree of a tree-sitter tree
Functions for tree-sitter parser packages
These functions are intended to be used by packages that implement tree-sitter parsers and use the ts package as a backend. It is unlikely that you will need to use these functions directly.
-
ts_collapse()ts_cnd()ts_caller_arg()as_ts_caller_arg()as.character(<ts_caller_arg>)ts_caller_env()ts_check_named_arg()ts_parse_error_cnd() - Utility functions for ts language implementations (internal)
-
ts_tree_mark_selection1() - Helper function to decide which AST nodes to highlight for a selection (internal)
-
ts_tree_select1() - Select nodes from a tree-sitter tree (internal)
-
ts_tree_selection()ts_tree_selected_nodes() - Helper functions for tree-sitter tree selections (internal)