Checks if x
is a tree_sitter_node
or not.
Examples
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)
#> [1] TRUE
is_node(1)
#> [1] FALSE