| is_tree | R Documentation |
x a tree?Checks if x is a tree_sitter_tree or not.
is_tree(x)
x |
An object. |
TRUE if x is a tree_sitter_tree, otherwise FALSE.
language <- treesitter.r::language()
parser <- parser(language)
text <- "fn <- function() { 1 + 1 }"
tree <- parser_parse(parser, text)
is_tree(tree)
is_tree(1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.