mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
30 lines
636 B
Rust
30 lines
636 B
Rust
//! Syntax types.
|
|
|
|
pub mod ast;
|
|
pub mod token;
|
|
|
|
mod ident;
|
|
mod span;
|
|
|
|
pub use ast::*;
|
|
pub use ident::*;
|
|
pub use span::*;
|
|
pub use token::*;
|
|
|
|
/// 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,
|
|
/// A key in a dictionary.
|
|
DictKey,
|
|
}
|