Complete string to list conversion with as
This commit is contained in:
parent
18508fa217
commit
52493a0b73
@ -34,7 +34,7 @@ impl AbstractTree for As {
|
||||
Ok(self.r#type.clone())
|
||||
}
|
||||
|
||||
fn validate(&self, source: &str, context: &Context) -> Result<(), ValidationError> {
|
||||
fn validate(&self, _source: &str, context: &Context) -> Result<(), ValidationError> {
|
||||
let expected_type = self.expression.expected_type(context)?;
|
||||
|
||||
if let Type::List(item_type) = &self.r#type {
|
||||
@ -48,20 +48,20 @@ impl AbstractTree for As {
|
||||
});
|
||||
}
|
||||
}
|
||||
Type::String => {}
|
||||
Type::Any => todo!(),
|
||||
Type::Boolean => todo!(),
|
||||
Type::Collection => todo!(),
|
||||
Type::Custom(_) => todo!(),
|
||||
Type::Float => todo!(),
|
||||
Type::Function {
|
||||
parameter_types,
|
||||
return_type,
|
||||
parameter_types: _,
|
||||
return_type: _,
|
||||
} => todo!(),
|
||||
Type::Integer => todo!(),
|
||||
Type::Map(_) => todo!(),
|
||||
Type::None => todo!(),
|
||||
Type::Number => todo!(),
|
||||
Type::String => todo!(),
|
||||
Type::Range => todo!(),
|
||||
Type::Option(_) => todo!(),
|
||||
}
|
||||
@ -101,7 +101,7 @@ impl AbstractTree for As {
|
||||
}
|
||||
|
||||
impl Format for As {
|
||||
fn format(&self, output: &mut String, indent_level: u8) {
|
||||
fn format(&self, _output: &mut String, _indent_level: u8) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
@ -4,9 +4,8 @@ use clap::{Parser, Subcommand};
|
||||
use crossterm::event::{KeyCode, KeyModifiers};
|
||||
use nu_ansi_term::{Color, Style};
|
||||
use reedline::{
|
||||
default_emacs_keybindings, ColumnarMenu, Completer, DefaultHinter, EditCommand, Emacs,
|
||||
Highlighter, Prompt, Reedline, ReedlineEvent, ReedlineMenu, Signal, Span, SqliteBackedHistory,
|
||||
StyledText, Suggestion,
|
||||
default_emacs_keybindings, ColumnarMenu, Completer, DefaultHinter, EditCommand, Emacs, Prompt,
|
||||
Reedline, ReedlineEvent, ReedlineMenu, Signal, Span, SqliteBackedHistory, Suggestion,
|
||||
};
|
||||
|
||||
use std::{borrow::Cow, fs::read_to_string, path::PathBuf, process::Command};
|
||||
|
Loading…
Reference in New Issue
Block a user