Skip to contents

Returns a data frame with capture_name, text, start_line, and start_col.

Usage

get_function_nodes(root, extract_params = FALSE, extract_return = FALSE)

Arguments

root

A tree-sitter root node.

extract_params

Logical; whether to extract parameter types for found functions. Default FALSE.

extract_return

Logical; whether to extract return types for found functions. Default FALSE.

Value

Data frame with function captures; when extract_params=TRUE a params list-column is present.