pub struct GrammarGraph {
pub root: Production,
pub defs: Vec<(Symbol, Production)>,
pub diagnostics: Vec<Diagnostic>,
}Expand description
A named codec-neutral grammar graph.
Fields§
§root: ProductionThe root production.
defs: Vec<(Symbol, Production)>Named productions referenced by Production::Ref.
diagnostics: Vec<Diagnostic>Diagnostics emitted during lowering.
Implementations§
Source§impl GrammarGraph
impl GrammarGraph
Sourcepub fn new(root: Production) -> Self
pub fn new(root: Production) -> Self
Builds a graph with root, no named definitions, and no diagnostics.
Trait Implementations§
Source§impl Clone for GrammarGraph
impl Clone for GrammarGraph
Source§fn clone(&self) -> GrammarGraph
fn clone(&self) -> GrammarGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GrammarGraph
impl Debug for GrammarGraph
impl Eq for GrammarGraph
Source§impl PartialEq for GrammarGraph
impl PartialEq for GrammarGraph
impl StructuralPartialEq for GrammarGraph
Auto Trait Implementations§
impl Freeze for GrammarGraph
impl RefUnwindSafe for GrammarGraph
impl Send for GrammarGraph
impl Sync for GrammarGraph
impl Unpin for GrammarGraph
impl UnsafeUnpin for GrammarGraph
impl UnwindSafe for GrammarGraph
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