is_query: Is 'x' a query?

View source: R/query.R

is_queryR 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)


treesitter documentation built on June 24, 2024, 5:07 p.m.