language_symbol_name: Language symbol names

View source: R/language.R

language_symbol_nameR Documentation

Language symbol names

Description

Get the name for a particular language symbol ID. Can be useful for exploring a grammar.

Usage

language_symbol_name(x, symbol)

Arguments

x

⁠[tree_sitter_language]⁠

A tree-sitter language object.

symbol

⁠[positive integer]⁠

The language symbols to look up names for.

Value

A character vector the same length as symbol containing:

  • The name of the symbol, if known.

  • NA, if the symbol was not known.

See Also

language_symbol_for_name()

Examples


language <- treesitter.r::language()
language_symbol_name(language, 1)


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