Parses a C++ function returning a tibble with the function name and return type and a list column with the arguments of the function.
parse_cpp_function(context, is_attribute = FALSE)
A tibble with the following fields: - name - The name of the function - return_type - The return type of the function - args - A list column containing a tibble of the functions arguments - type - The type of the argument - name - The name of the argument - default - The default value of the argument (if any).
# Setup
context <- "int fun(int x) { return x + 1; }"
# Parse the function
parse_cpp_function(context)
#> # A tibble: 1 × 3
#> name return_type args
#> <chr> <chr> <list>
#> 1 fun int <tibble [1 × 3]>