oak_json/highlighter/
mod.rs1use crate::kind::JsonSyntaxKind;
2
3#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5pub enum HighlightKind {
6 Keyword,
8 String,
10 Number,
12 Comment,
14 Identifier,
16 Literal,
18}
19
20pub trait Highlighter {
22 fn highlight(&self, text: &str) -> Vec<(usize, usize, HighlightKind)>;
24}
25
26pub struct JsonHighlighter;
28
29impl JsonHighlighter {
30 pub fn new() -> Self {
31 Self
32 }
33}
34
35impl Highlighter for JsonHighlighter {
36 fn highlight(&self, text: &str) -> Vec<(usize, usize, HighlightKind)> {
37 Vec::new()
39 }
40}