is_parser: Is 'x' a parser?

View source: R/parser.R

is_parserR Documentation

Is x a parser?

Description

Checks if x is a tree_sitter_parser or not.

Usage

is_parser(x)

Arguments

x

⁠[object]⁠

An object.

Value

TRUE if x is a tree_sitter_parser, otherwise FALSE.

Examples


language <- treesitter.r::language()
parser <- parser(language)

is_parser(parser)

is_parser(1)


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