parser | R Documentation |
parser()
constructs a parser from a tree-sitter language
object. You can
use parser_parse()
to parse language specific text with it.
parser(language)
language |
A language object. |
A new parser.
language <- treesitter.r::language()
parser <- parser(language)
parser
text <- "1 + foo"
tree <- parser_parse(parser, text)
tree
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.