Function starlark::eval::interactive::eval
source · pub fn eval(path: &str, content: &str, build: bool, env: &mut Environment)
Expand description
Evaluate a string content, mutate the environment accordingly and print
the value of the last statement (if not None
) or the error diagnostic.
Arguments
This version uses the SimpleFileLoader implementation for the file loader
- path: the name of the file being evaluated, for diagnostics
- content: the content to evaluate
- build: set to true if you want to evaluate a BUILD file or false to evaluate a .bzl file. More information about the difference can be found in the eval module’s documentation.
- env: the environment to mutate during the evaluation