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