Store tokens instead of text in insert

This commit is contained in:
Andras Schmelczer 2024-11-28 20:51:05 +00:00
parent 3391d2c0ec
commit 44f9a44f63
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
10 changed files with 144 additions and 74 deletions

View file

@ -1,10 +1,9 @@
use crate::tokenizer::token::Token;
use std::hash::Hash;
#[derive(Debug, Clone, PartialEq)]
pub enum RawOperation<T>
where
T: PartialEq + Hash + Clone,
T: PartialEq + Clone,
{
Insert(Vec<Token<T>>),
Delete(Vec<Token<T>>),
@ -13,7 +12,7 @@ where
impl<T> RawOperation<T>
where
T: PartialEq + Hash + Clone,
T: PartialEq + Clone,
{
pub fn tokens(&self) -> &Vec<Token<T>> {
match self {