/trees

What the Package Does (One Line, Title Case)

Primary LanguageCOtherNOASSERTION

---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# trees

<!-- badges: start -->
<!-- badges: end -->

The goal of trees is to ...

## Installation

You can install the development version of trees like so:

``` r
pak::pak("DavisVaughan/trees")
```

## Example

This is a basic example which shows you how to solve a common problem:

```{r example}
library(trees)

language <- language_r()
language$node_kind_for_id(3L)

parser <- Parser$new(language)
tree <- parser$parse("x + 1")

node <- tree$root_node()
node

node |>
  node_child(0) |>
  node_children()
```

```{r cars}
language <- language_from_github("tree-sitter/tree-sitter-python", branch = "master")
language$node_kind_for_id(3L)

parser <- Parser$new(language)
tree <- parser$parse("x + 1")

node_as_text(tree$root_node())
```