language_symbol_for_name {treesitter}R Documentation

Language symbols

Description

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

Usage

language_symbol_for_name(x, name, ..., named = TRUE)

Arguments

x

⁠[tree_sitter_language]⁠

A tree-sitter language object.

name

⁠[character]⁠

The names to look up symbols for.

...

These dots are for future extensions and must be empty.

named

⁠[logical]⁠

Should named or anonymous nodes be looked up? Recycled to the size of name.

Value

An integer vector the same size as name containing either:

See Also

language_symbol_name()

Examples


language <- treesitter.r::language()
language_symbol_for_name(language, "identifier")


[Package treesitter version 0.1.0 Index]