690dd55a86
Co-authored-by: Gerard Guillemas Martos <gerard.guillemas@surrealdb.com>
25 lines
561 B
Rust
25 lines
561 B
Rust
use revision::revisioned;
|
|
use serde::{Deserialize, Serialize};
|
|
use std::fmt;
|
|
use std::fmt::Display;
|
|
|
|
#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Serialize, Deserialize, Hash)]
|
|
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
|
|
#[revisioned(revision = 1)]
|
|
pub enum Tokenizer {
|
|
Blank,
|
|
Camel,
|
|
Class,
|
|
Punct,
|
|
}
|
|
|
|
impl Display for Tokenizer {
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
f.write_str(match self {
|
|
Self::Blank => "BLANK",
|
|
Self::Camel => "CAMEL",
|
|
Self::Class => "CLASS",
|
|
Self::Punct => "PUNCT",
|
|
})
|
|
}
|
|
}
|