pub struct ParseNodeOrdGroup {
pub mode: Mode,
pub loc: Option<SourceLocation>,
pub body: Vec<AnyParseNode>,
pub semisimple: Option<bool>,
}
Expand description
Represents ordered groups of mathematical expressions, typically enclosed in parentheses or brackets.
This struct handles grouped expressions that should be treated as a single unit, such as parenthesized subexpressions or bracketed terms.
§Fields
mode
- The parsing mode (Mode::Math
orMode::Text
)loc
- Optional source location for error reportingbody
- The expressions contained within the groupsemisimple
- Whether this is a simple grouping (affects spacing and rendering)
§LaTeX Correspondence
Corresponds to grouped expressions:
(x + y) % Parentheses
{a + b} % Braces
[c + d] % Brackets
§Usage
OrdGroups ensure proper precedence and grouping in mathematical expressions, affecting both parsing order and visual rendering with appropriate delimiters.
Fields§
§mode: Mode
The parsing mode (Mode::Math
or Mode::Text
)
loc: Option<SourceLocation>
Optional source location for error reporting
body: Vec<AnyParseNode>
The expressions contained within the group
semisimple: Option<bool>
Whether this is a simple grouping (affects spacing and rendering)
Trait Implementations§
Source§impl Clone for ParseNodeOrdGroup
impl Clone for ParseNodeOrdGroup
Source§fn clone(&self) -> ParseNodeOrdGroup
fn clone(&self) -> ParseNodeOrdGroup
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 ParseNodeOrdGroup
impl Debug for ParseNodeOrdGroup
Source§impl PartialEq for ParseNodeOrdGroup
impl PartialEq for ParseNodeOrdGroup
impl StructuralPartialEq for ParseNodeOrdGroup
Auto Trait Implementations§
impl Freeze for ParseNodeOrdGroup
impl RefUnwindSafe for ParseNodeOrdGroup
impl Send for ParseNodeOrdGroup
impl Sync for ParseNodeOrdGroup
impl Unpin for ParseNodeOrdGroup
impl UnwindSafe for ParseNodeOrdGroup
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