Returns the arguments of a function from a valid R file.
Value
A named character vector as returned by formals().
Examples
uri <- system.file("testfiles/funcs.R", package = "toscutil")
content <- readLines(uri)
func <- "f2"
if (requireNamespace("languageserver", quietly = TRUE)) {
    get_formals(uri, content, func)
}
#> $a
#> 
#> 
#> $b
#> 
#> 
#> $x
#> [1] 1
#> 
#> $...
#> 
#>