[−][src]Function starlark::eval::eval
pub fn eval(
map: &Arc<Mutex<CodeMap>>,
path: &str,
content: &str,
build: Dialect,
env: &mut Environment,
type_values: &TypeValues,
file_loader: &dyn FileLoader
) -> Result<Value, Diagnostic>
Evaluate a string content, mutate the environment accordingly and return the evaluated value.
Arguments
- map: the codemap object used for diagnostics
- 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 this module's documentation.
- env: the environment to mutate during the evaluation
- file_loader: the
FileLoader
to react toload()
statements.