[][src]Function starlark_repl::repl

pub fn repl(
    global_environment: &mut Environment,
    type_values: &TypeValues,
    dialect: Dialect
)

A REPL (Read-Eval-Print Loop) for Starlark.

This method run a REPL until the user hit Ctrl+D. It can be used for interactive use where the parent enviroment offer side-effect methods.

Parameters:

  • global_environment: the parent enviroment for the loop.
  • dialect: Starlark language dialect.
  • ast: print AST instead of evaluating.