Complete string to list conversion with as

This commit is contained in:
Jeff 2024-02-13 10:36:43 -05:00
parent 18508fa217
commit 52493a0b73
2 changed files with 7 additions and 8 deletions

View File

@ -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!()
}
}

View File

@ -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};