Adding stubs for type casting to string and boolean.

This commit is contained in:
Tom Alexander
2020-06-14 16:38:55 -04:00
parent d47e004084
commit 8ab315abfe
2 changed files with 25 additions and 0 deletions

View File

@@ -222,6 +222,16 @@ impl Castable for OwnedLiteral {
(OwnedLiteral::LPositiveInteger(_), "number") => Some(IceResult::from_borrowed(self)),
(OwnedLiteral::LNegativeInteger(_), "number") => Some(IceResult::from_borrowed(self)),
(OwnedLiteral::LFloat(_), "number") => Some(IceResult::from_borrowed(self)),
(OwnedLiteral::LString(text), "string") => todo!(),
(OwnedLiteral::LPositiveInteger(_), "string") => todo!(),
(OwnedLiteral::LNegativeInteger(_), "string") => todo!(),
(OwnedLiteral::LFloat(_), "string") => todo!(),
(OwnedLiteral::LString(text), "boolean") => todo!(),
(OwnedLiteral::LPositiveInteger(_), "boolean") => todo!(),
(OwnedLiteral::LNegativeInteger(_), "boolean") => todo!(),
(OwnedLiteral::LFloat(_), "boolean") => todo!(),
(_, _) => panic!("Unimplemented cast"),
}
}