Clarify todo/fixmes

This commit is contained in:
JT
2021-10-13 06:44:23 +13:00
parent 67b8438bda
commit 6024a001b4
18 changed files with 31 additions and 46 deletions

View File

@ -26,7 +26,7 @@ pub enum Expr {
ValueWithUnit(Box<Expression>, Spanned<Unit>),
Filepath(String),
GlobPattern(String),
String(String), // FIXME: improve this in the future?
String(String),
CellPath(CellPath),
FullCellPath(Box<FullCellPath>),
Signature(Box<Signature>),

View File

@ -39,7 +39,7 @@ impl Expression {
| Operator::In
| Operator::NotIn => 80,
Operator::And => 50,
Operator::Or => 40, // TODO: should we have And and Or be different precedence?
Operator::Or => 40,
}
}
_ => 0,

View File

@ -25,8 +25,8 @@ impl EvaluationContext {
// We need to make values concreate before we assign them to variables, as stream values
// will drain and remain drained.
//
// TODO: find a good home for this
// TODO: add ctrl-c support
// TODO: find a good home for converting a stream->list when storing into a variable
// TODO: add ctrl-c support when setting a var
let value = match value {
Value::Stream { stream, span } => Value::List {

View File

@ -108,7 +108,7 @@ impl SyntaxShape {
SyntaxShape::Boolean => Type::Bool,
SyntaxShape::Signature => Type::Unknown,
SyntaxShape::String => Type::String,
SyntaxShape::Table => Type::List(Box::new(Type::Unknown)), // FIXME
SyntaxShape::Table => Type::List(Box::new(Type::Unknown)), // FIXME: Tables should have better types
SyntaxShape::VarWithOptType => Type::Unknown,
SyntaxShape::Variable => Type::Unknown,
}

View File

@ -24,7 +24,7 @@ impl Range {
operator: &RangeOperator,
) -> Result<Range, ShellError> {
// Select from & to values if they're not specified
// TODO: Replace the placeholder values with proper min/max based on data type
// TODO: Replace the placeholder values with proper min/max for range based on data type
let from = if let Value::Nothing { .. } = from {
Value::Int {
val: 0i64,

View File

@ -62,7 +62,6 @@ impl<'de> Deserialize<'de> for ValueStream {
where
D: serde::Deserializer<'de>,
{
// FIXME: implement these
deserializer.deserialize_seq(MySeqVisitor)
}
}