mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-23 19:43:10 +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,
|
|
}
|
|
}
|
|
}
|