Skip to main content

mt_core/
lib.rs

1//! Model layer for the equation editor: the tree that parsers build, the editor mutates and the
2//! renderers draw.
3//!
4//! ```
5//! use mt_core::{Math, Node, Path};
6//!
7//! let mut equation = Math::new(Node::row([Node::variable('a')]));
8//! equation.body.insert_at(&Path::root(), Node::variable('b'));
9//! assert_eq!(equation.body.slot_count(), 2);
10//! ```
11#![forbid(unsafe_code)]
12
13pub mod ast;
14pub mod faces;
15
16pub use ast::{
17    Accent, AccentKind, BigOp, Char, Class, Delim, Fence, Font, Frac, FracKind, Limits, Math,
18    MathStyle, Matrix, MatrixKind, Node, Path, Row, Scripts, Side, Space, Sqrt, Styled, TextRun,
19};
20pub use faces::{
21    Convention, class_of_char, class_of_char_with, extra_letter, is_cjk, is_extra_face,
22    is_large_op_with, is_symbol_face,
23};