pub struct ParseNodeAccent {
pub mode: Mode,
pub loc: Option<SourceLocation>,
pub label: String,
pub is_stretchy: Option<bool>,
pub is_shifty: Option<bool>,
pub base: AnyParseNode,
}
Expand description
Represents accent marks placed above mathematical expressions.
This struct handles diacritical marks and accents that modify the appearance of base mathematical expressions, such as hats, bars, and tildes.
§Fields
mode
- The parsing mode (Mode::Math
orMode::Text
)loc
- Optional source location for error reportinglabel
- The accent symbol (e.g., “^”, “-”, “~”)is_stretchy
- Whether the accent stretches to fit the base widthis_shifty
- Whether the accent is shifted for better positioningbase
- The expression being accented
§LaTeX Correspondence
Corresponds to LaTeX accent commands:
\hat{x} % Hat
\bar{y} % Bar
\tilde{z} % Tilde
\widehat{abc} % Wide hat
§Usage
Accent nodes modify the visual appearance of mathematical symbols, commonly used for vectors, complex numbers, and special notation.
Fields§
§mode: Mode
The parsing mode (Mode::Math
or Mode::Text
)
loc: Option<SourceLocation>
Optional source location for error reporting
label: String
The accent symbol (e.g., “^”, “-”, “~”)
is_stretchy: Option<bool>
Whether the accent stretches to fit the base width
is_shifty: Option<bool>
Whether the accent is shifted for better positioning
base: AnyParseNode
The expression being accented
Trait Implementations§
Source§impl Clone for ParseNodeAccent
impl Clone for ParseNodeAccent
Source§fn clone(&self) -> ParseNodeAccent
fn clone(&self) -> ParseNodeAccent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ParseNodeAccent
impl Debug for ParseNodeAccent
Source§impl PartialEq for ParseNodeAccent
impl PartialEq for ParseNodeAccent
impl StructuralPartialEq for ParseNodeAccent
Auto Trait Implementations§
impl Freeze for ParseNodeAccent
impl RefUnwindSafe for ParseNodeAccent
impl Send for ParseNodeAccent
impl Sync for ParseNodeAccent
impl Unpin for ParseNodeAccent
impl UnwindSafe for ParseNodeAccent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more