mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-24 03:53:09 +08:00
16 lines
361 B
Rust
16 lines
361 B
Rust
|
use charabia::{SeparatorKind, Token, TokenKind};
|
||
|
|
||
|
pub enum SimpleTokenKind {
|
||
|
Separator(SeparatorKind),
|
||
|
NotSeparator,
|
||
|
}
|
||
|
|
||
|
impl SimpleTokenKind {
|
||
|
pub fn new(token: &&Token<'_>) -> Self {
|
||
|
match token.kind {
|
||
|
TokenKind::Separator(separaor_kind) => Self::Separator(separaor_kind),
|
||
|
_ => Self::NotSeparator,
|
||
|
}
|
||
|
}
|
||
|
}
|