|
|
@ -21,6 +21,7 @@ use crate::renderer::Walkable;
|
|
|
|
use std::borrow::Borrow;
|
|
|
|
use std::borrow::Borrow;
|
|
|
|
use std::cmp::Ordering;
|
|
|
|
use std::cmp::Ordering;
|
|
|
|
use std::collections::HashMap;
|
|
|
|
use std::collections::HashMap;
|
|
|
|
|
|
|
|
use std::convert::TryInto;
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct ParametersContext<'a> {
|
|
|
|
pub struct ParametersContext<'a> {
|
|
|
@ -192,7 +193,14 @@ impl Walkable for OwnedLiteral {
|
|
|
|
|
|
|
|
|
|
|
|
impl Sizable for OwnedLiteral {
|
|
|
|
impl Sizable for OwnedLiteral {
|
|
|
|
fn get_size<'a>(&'a self) -> Option<IceResult<'a>> {
|
|
|
|
fn get_size<'a>(&'a self) -> Option<IceResult<'a>> {
|
|
|
|
todo!()
|
|
|
|
match self {
|
|
|
|
|
|
|
|
OwnedLiteral::LFloat(_) => Some(IceResult::from_borrowed(self)),
|
|
|
|
|
|
|
|
OwnedLiteral::LPositiveInteger(_) => Some(IceResult::from_borrowed(self)),
|
|
|
|
|
|
|
|
OwnedLiteral::LNegativeInteger(_) => Some(IceResult::from_borrowed(self)),
|
|
|
|
|
|
|
|
OwnedLiteral::LString(text) => Some(IceResult::from_owned(
|
|
|
|
|
|
|
|
OwnedLiteral::LPositiveInteger(text.len().try_into().unwrap()),
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|