summaryrefslogtreecommitdiff
path: root/src/syntax/mod.rs
blob: f442ba9e09c96fac6288ed64ef2fb440e3f13584 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//! Syntax types.

mod lines;
mod span;
mod token;
mod tree;

pub use lines::*;
pub use span::*;
pub use token::*;
pub use tree::*;

/// Decorations for semantic syntax highlighting.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "serialize", serde(rename_all = "camelCase"))]
pub enum Decoration {
    /// Text in italics.
    Italic,
    /// Text in bold.
    Bold,
    /// A valid, successfully resolved name.
    Resolved,
    /// An invalid, unresolved name.
    Unresolved,
    /// The key part of a key-value entry in a table.
    TableKey,
}