mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 18:42:42 +02:00
Remove old alias implementation (#8797)
This commit is contained in:
@ -64,13 +64,7 @@ pub(crate) fn parse_commandline_args(
|
||||
let mut working_set = StateWorkingSet::new(engine_state);
|
||||
working_set.add_decl(Box::new(Nu));
|
||||
|
||||
let output = parse(
|
||||
&mut working_set,
|
||||
None,
|
||||
commandline_args.as_bytes(),
|
||||
false,
|
||||
&[],
|
||||
);
|
||||
let output = parse(&mut working_set, None, commandline_args.as_bytes(), false);
|
||||
if let Some(err) = working_set.parse_errors.first() {
|
||||
report_error(&working_set, err);
|
||||
|
||||
|
@ -22,7 +22,7 @@ fn find_id(
|
||||
location: &Value,
|
||||
) -> Option<(Id, usize, Span)> {
|
||||
let offset = working_set.next_span_start();
|
||||
let block = parse(working_set, Some(file_path), file, false, &[]);
|
||||
let block = parse(working_set, Some(file_path), file, false);
|
||||
|
||||
let flattened = flatten_block(working_set, &block);
|
||||
|
||||
@ -78,7 +78,7 @@ pub fn check(engine_state: &mut EngineState, file_path: &String) {
|
||||
|
||||
if let Ok(contents) = file {
|
||||
let offset = working_set.next_span_start();
|
||||
let block = parse(&mut working_set, Some(file_path), &contents, false, &[]);
|
||||
let block = parse(&mut working_set, Some(file_path), &contents, false);
|
||||
|
||||
for err in &working_set.parse_errors {
|
||||
let mut span = err.span();
|
||||
|
10
src/run.rs
10
src/run.rs
@ -62,18 +62,14 @@ fn load_standard_library(
|
||||
working_set.add_file(name.clone(), content);
|
||||
let end = working_set.next_span_start();
|
||||
|
||||
let (_, module, comments) = parse_module_block(
|
||||
&mut working_set,
|
||||
Span::new(start, end),
|
||||
name.as_bytes(),
|
||||
&[],
|
||||
);
|
||||
let (_, module, comments) =
|
||||
parse_module_block(&mut working_set, Span::new(start, end), name.as_bytes());
|
||||
|
||||
if let Some(err) = working_set.parse_errors.first() {
|
||||
report_error(&working_set, err);
|
||||
}
|
||||
|
||||
parse(&mut working_set, Some(&name), content, true, &[]);
|
||||
parse(&mut working_set, Some(&name), content, true);
|
||||
|
||||
if let Some(err) = working_set.parse_errors.first() {
|
||||
report_error(&working_set, err);
|
||||
|
@ -229,7 +229,6 @@ pub fn nu_repl() {
|
||||
Some(&format!("line{i}")),
|
||||
line.as_bytes(),
|
||||
false,
|
||||
&[],
|
||||
);
|
||||
|
||||
if let Some(err) = working_set.parse_errors.first() {
|
||||
|
Reference in New Issue
Block a user