powered by
The function parses the code and returns a list of expressions and source references.
parse_code(code)
A list of expressions and source references
Each item of the list is a list with the following elements:
expr: The expression
expr
srcref: The source reference
srcref
eval: A logical indicating whether the expression should be evaluated, i.e., it is not a comment or an empty line.
eval
The code to parse
A character vector
none
parse_code("1+1\n2*2") parse_code(c("# sum:", "sum(\n 1, #first\n 2\n)"))
Run the code above in your browser using DataLab