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