Crate nu_engine

Source
Expand description

This crate primarily drives the evaluation of expressions.

(Some overlap with nu-protocol)

  • Provides CallExt

§Internal Nushell crate

This crate implements components of Nushell and is not designed to support plugin authors or other users directly.

Re-exports§

pub use column::get_columns;
pub use documentation::get_full_help;
pub use env::*;

Modules§

column
command_prelude
documentation
env
scope

Structs§

ClosureEval
ClosureEval is used to repeatedly evaluate a closure with different values/inputs.
ClosureEvalOnce
ClosureEvalOnce is used to evaluate a closure a single time.

Traits§

CallExt

Functions§

compile
Compile Nushell pipeline abstract syntax tree (AST) to internal representation (IR) instructions for evaluation.
eval_block
eval_block_with_early_return
eval_call
eval_expression
eval_expression_with_input
Checks the expression to see if it’s a internal or external call. If so, passes the input into the call and gets out the result Otherwise, invokes the expression
eval_ir_block
Evaluate the compiled representation of a Block.
eval_subexpression
eval_variable
get_eval_block
Helper function to fetch eval_block() with the correct type parameter based on whether engine_state is configured with or without a debugger.
get_eval_block_with_early_return
Helper function to fetch eval_block_with_early_return() with the correct type parameter based on whether engine_state is configured with or without a debugger.
get_eval_expression
Helper function to fetch eval_expression() with the correct type parameter based on whether engine_state is configured with or without a debugger.
get_eval_expression_with_input
Helper function to fetch eval_expression_with_input() with the correct type parameter based on whether engine_state is configured with or without a debugger.
get_eval_ir_block
Helper function to fetch eval_ir_block() with the correct type parameter based on whether engine_state is configured with or without a debugger.
get_eval_subexpression
Helper function to fetch eval_subexpression() with the correct type parameter based on whether engine_state is configured with or without a debugger.
glob_from
This function is like nu_glob::glob from the glob crate, except it is relative to a given cwd.
redirect_env
Redirect the environment from callee to the caller.

Type Aliases§

EvalBlockFn
Type of eval_block() function
EvalBlockWithEarlyReturnFn
Type of eval_block_with_early_return() function
EvalExpressionFn
Type of eval_expression() function
EvalExpressionWithInputFn
Type of eval_expression_with_input() function
EvalIrBlockFn
Type of eval_ir_block() function
EvalSubexpressionFn
Type of eval_subexpression() function