def argument check (#604)

* def argument check

* corrected test

* clippy error
This commit is contained in:
Fernando Herrera
2021-12-27 19:13:52 +00:00
committed by GitHub
parent 1837acfc70
commit 53330c5676
6 changed files with 116 additions and 127 deletions

View File

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

View File

@ -24,6 +24,7 @@ pub enum Type {
Error,
Binary,
Custom,
Signature,
}
impl Display for Type {
@ -57,6 +58,7 @@ impl Display for Type {
Type::Error => write!(f, "error"),
Type::Binary => write!(f, "binary"),
Type::Custom => write!(f, "custom"),
Type::Signature => write!(f, "signature"),
}
}
}