mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 17:58:37 +02:00
Rename the use of invocation to subexpression (#3568)
* Rename the use of invocation to subexpression * Fix test name
This commit is contained in:
@ -37,7 +37,7 @@ pub fn evaluate_baseline_expr(
|
||||
}
|
||||
Expression::Variable(var, s) => evaluate_reference(&var, ctx, *s),
|
||||
Expression::Command => unimplemented!(),
|
||||
Expression::Invocation(block) => evaluate_invocation(block, ctx),
|
||||
Expression::Subexpression(block) => evaluate_subexpression(block, ctx),
|
||||
Expression::ExternalCommand(_) => unimplemented!(),
|
||||
Expression::Binary(binary) => {
|
||||
// TODO: If we want to add short-circuiting, we'll need to move these down
|
||||
@ -277,7 +277,10 @@ fn evaluate_reference(
|
||||
}
|
||||
}
|
||||
|
||||
fn evaluate_invocation(block: &hir::Block, ctx: &EvaluationContext) -> Result<Value, ShellError> {
|
||||
fn evaluate_subexpression(
|
||||
block: &hir::Block,
|
||||
ctx: &EvaluationContext,
|
||||
) -> Result<Value, ShellError> {
|
||||
// FIXME: we should use a real context here
|
||||
let input = match ctx.scope.get_var("$it") {
|
||||
Some(it) => InputStream::one(it),
|
||||
|
@ -1,3 +1,3 @@
|
||||
mod invocation;
|
||||
mod operator;
|
||||
mod subexpression;
|
||||
mod variables;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use nu_test_support::nu;
|
||||
|
||||
#[test]
|
||||
fn test_parse_invocation_with_range() {
|
||||
fn test_parse_subexpression_with_range() {
|
||||
let actual = nu!(
|
||||
cwd: ".",
|
||||
r#"
|
Reference in New Issue
Block a user