summaryrefslogtreecommitdiff
path: root/src/syntax/mod.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-09-30 12:49:30 +0200
committerLaurenz <laurmaedje@gmail.com>2020-09-30 12:49:30 +0200
commit3e791e3337b912ebc1f1771c4a1c0e4ed5723198 (patch)
treeb2c54ba4f24111423c60c4a32e1616fedecce58d /src/syntax/mod.rs
parentbc1b4216a802d09e8d00dd277a0e204d49bcaa7f (diff)
Move decoration into mod.rs 🔙
Diffstat (limited to 'src/syntax/mod.rs')
-rw-r--r--src/syntax/mod.rs19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs
index 1b9f8ba8..fe887c2f 100644
--- a/src/syntax/mod.rs
+++ b/src/syntax/mod.rs
@@ -1,11 +1,26 @@
//! Syntax types.
-mod decoration;
mod span;
mod token;
mod tree;
-pub use decoration::*;
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,
+}