mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:16:05 +02:00
More external cleanup
This commit is contained in:
@ -63,8 +63,8 @@ pub fn flatten_expression(
|
||||
}
|
||||
output
|
||||
}
|
||||
Expr::ExternalCall(name, args) => {
|
||||
let mut output = vec![(*name, FlatShape::External)];
|
||||
Expr::ExternalCall(_, name_span, args) => {
|
||||
let mut output = vec![(*name_span, FlatShape::External)];
|
||||
|
||||
for arg in args {
|
||||
//output.push((*arg, FlatShape::ExternalArg));
|
||||
|
@ -108,7 +108,8 @@ pub fn parse_external_call(
|
||||
spans: &[Span],
|
||||
) -> (Expression, Option<ParseError>) {
|
||||
let mut args = vec![];
|
||||
let name = spans[0];
|
||||
let name_span = spans[0];
|
||||
let name = String::from_utf8_lossy(working_set.get_span_contents(name_span)).to_string();
|
||||
let mut error = None;
|
||||
|
||||
for span in &spans[1..] {
|
||||
@ -129,7 +130,7 @@ pub fn parse_external_call(
|
||||
}
|
||||
(
|
||||
Expression {
|
||||
expr: Expr::ExternalCall(name, args),
|
||||
expr: Expr::ExternalCall(name, name_span, args),
|
||||
span: span(spans),
|
||||
ty: Type::Unknown,
|
||||
custom_completion: None,
|
||||
|
Reference in New Issue
Block a user