node_raw_s_expression {treesitter} | R Documentation |
"Raw" S-expression
Description
node_raw_s_expression()
returns the "raw" s-expression as seen by
tree-sitter. Most of the time, node_show_s_expression()
provides a better
view of the tree, but occasionally it can be useful to see exactly what the
underlying C library is using.
Usage
node_raw_s_expression(x)
Arguments
x |
A node. |
Value
A single string containing the raw s-expression.
Examples
language <- treesitter.r::language()
parser <- parser(language)
text <- "1 + foo"
tree <- parser_parse(parser, text)
node <- tree_root_node(tree)
node_raw_s_expression(node)
[Package treesitter version 0.1.0 Index]