find_declaration.Rd
Finds a block and returns the range of line numbers encompassed by that block.
find_declaration(x, name)
a stanedit
object
of the block to find
an integer, the line numbes where the variable is declared; an empty integer if the declaration is not found
model_file_name <- system.file(package = "stanedit", "regression.stan")
reg <- stanedit(filename = model_file_name)
find_declaration(reg, "alpha")
#> [1] 7