refactor: type

This commit is contained in:
2025-05-03 20:33:59 +08:00
parent 3f0cb2c2fa
commit 4a310ff317
23 changed files with 475 additions and 309 deletions

30
src/ty/internal/string.rs Normal file
View File

@@ -0,0 +1,30 @@
// TODO: Contextful String
use ecow::EcoString;
use rpds::List;
pub struct StringContext {
context: List<()>,
}
impl StringContext {
pub fn new() -> StringContext {
StringContext {
context: List::new(),
}
}
}
pub struct ContextfulString {
string: EcoString,
context: StringContext,
}
impl ContextfulString {
pub fn new(string: EcoString) -> ContextfulString {
ContextfulString {
string,
context: StringContext::new(),
}
}
}