refactor: type
This commit is contained in:
30
src/ty/internal/string.rs
Normal file
30
src/ty/internal/string.rs
Normal 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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user