is_query {treesitter}R Documentation

Is x a query?

Description

Checks if x is a tree_sitter_query or not.

Usage

is_query(x)

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)

is_query(1)


[Package treesitter version 0.1.0 Index]