Store tokens instead of text in insert
This commit is contained in:
parent
3391d2c0ec
commit
44f9a44f63
10 changed files with 144 additions and 74 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue