% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.R
\name{print.ts_tree}
\alias{print.ts_tree}
\title{Print a tree-sitter tree}
\usage{
\method{print}{ts_tree}(x, n = 10, ...)
}
\arguments{
\item{x}{\code{ts_tree} object to print.}

\item{n}{Number of lines, or number of selections to print.}

\item{...}{Not used currently.}
}
\value{
Invisibly returns the original \code{ts_tree} object.
}
\description{
Print a \code{ts_tree} object to the screen.
}
\details{
Calls \code{\link[tsitter:format.ts_tree]{format.ts_tree()}} to format the
ts_tree object, writes the formatted object to the standard output, and
returns the original object invisibly.
}
\examples{
\dontshow{if (requireNamespace("tsjsonc", quietly = TRUE)) withAutoprint(\{ # examplesIf}
# Create a parse tree with tsjsonc -------------------------------------
json <- tsjsonc::ts_parse_jsonc(
  '{ "a": 1, "b": [10, 20, 30], "c": { "c1": true, "c2": 100 } }'
)
print(json)
\dontshow{\}) # examplesIf}
}
\seealso{
Other ts_tree generics:
\code{\link[=[[.ts_tree]{[[.ts_tree()}},
\code{\link[=[[<-.ts_tree]{[[<-.ts_tree()}},
\code{\link[=format.ts_tree]{format.ts_tree()}},
\code{\link{select-set}},
\code{\link[=ts_tree_ast]{ts_tree_ast()}},
\code{\link[=ts_tree_delete]{ts_tree_delete()}},
\code{\link[=ts_tree_dom]{ts_tree_dom()}},
\code{\link[=ts_tree_format]{ts_tree_format()}},
\code{\link[=ts_tree_insert]{ts_tree_insert()}},
\code{\link[=ts_tree_new]{ts_tree_new()}},
\code{\link[=ts_tree_query]{ts_tree_query()}},
\code{\link[=ts_tree_select]{ts_tree_select()}},
\code{\link[=ts_tree_sexpr]{ts_tree_sexpr()}},
\code{\link[=ts_tree_unserialize]{ts_tree_unserialize()}},
\code{\link[=ts_tree_update]{ts_tree_update()}},
\code{\link[=ts_tree_write]{ts_tree_write()}}
}
\concept{ts_tree generics}
