temp commit

This commit is contained in:
2025-07-12 00:46:10 +02:00
parent 1868f1a506
commit fe89188c4b
60 changed files with 1536 additions and 709 deletions

View File

@@ -82,17 +82,17 @@ impl OwnedAtom for IntStrAtom {
}
#[derive(Clone)]
pub struct OrcString<'a> {
kind: OrcStringKind<'a>,
pub struct OrcString {
kind: OrcStringKind,
ctx: SysCtx,
}
#[derive(Clone)]
pub enum OrcStringKind<'a> {
Val(TypAtom<'a, StrAtom>),
Int(TypAtom<'a, IntStrAtom>),
pub enum OrcStringKind {
Val(TypAtom<StrAtom>),
Int(TypAtom<IntStrAtom>),
}
impl OrcString<'_> {
impl OrcString {
pub async fn get_string(&self) -> Rc<String> {
match &self.kind {
OrcStringKind::Int(tok) => self.ctx.i().ex(**tok).await.rc(),
@@ -101,8 +101,8 @@ impl OrcString<'_> {
}
}
impl TryFromExpr for OrcString<'static> {
async fn try_from_expr(expr: Expr) -> OrcRes<OrcString<'static>> {
impl TryFromExpr for OrcString {
async fn try_from_expr(expr: Expr) -> OrcRes<OrcString> {
if let Ok(v) = TypAtom::<StrAtom>::try_from_expr(expr.clone()).await {
return Ok(OrcString { ctx: expr.ctx(), kind: OrcStringKind::Val(v) });
}