x
R/query.R
is_query.Rd
Checks if x is a tree_sitter_query or not.
tree_sitter_query
is_query(x)
[object]
An object.
TRUE if x is a tree_sitter_query, otherwise FALSE.
TRUE
FALSE
source <- "(identifier) @id" language <- treesitter.r::language() query <- query(language, source) is_query(query) #> [1] TRUE is_query(1) #> [1] FALSE