pub struct GrammarMergeOptions<'a> {
pub samples: BTreeMap<String, Vec<String>>,
pub required_equivalences: Vec<(String, String)>,
pub previous: Option<&'a GrammarMergeResult>,
pub decorators: DecoratorSet,
pub reconcile: bool,
}Expand description
Optional inputs of merge_grammars.
Fields§
§samples: BTreeMap<String, Vec<String>>Sample inputs keyed by sourceId:ruleName; identical samples only
nominate candidates, they never decide a merge.
required_equivalences: Vec<(String, String)>Pairs of sourceId:ruleName aliases that must end up merged.
previous: Option<&'a GrammarMergeResult>An earlier result: unchanged groups are reused and established canonical names are kept.
decorators: DecoratorSetmerge-decision decorators, which see each decision as { kind, name, members, basis, definition } (members joined by spaces): they
may change the kind or the basis, and drop removes the decision.
They change the reported decisions only, never the merged grammar.
reconcile: boolAlso unite corresponding rules of different sources that are
equivalent up to their lexical roles, or that share a name when no
correspondence matched them (see reconcile.rs). Each such class is a
GrammarMergeDecisionKind::Reconciled decision, kept by the
definition of its first source and the concept of its first rule that
has one.
Trait Implementations§
Source§impl<'a> Clone for GrammarMergeOptions<'a>
impl<'a> Clone for GrammarMergeOptions<'a>
Source§fn clone(&self) -> GrammarMergeOptions<'a>
fn clone(&self) -> GrammarMergeOptions<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for GrammarMergeOptions<'a>
impl<'a> Debug for GrammarMergeOptions<'a>
Source§impl<'a> Default for GrammarMergeOptions<'a>
impl<'a> Default for GrammarMergeOptions<'a>
Source§fn default() -> GrammarMergeOptions<'a>
fn default() -> GrammarMergeOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for GrammarMergeOptions<'a>
impl<'a> RefUnwindSafe for GrammarMergeOptions<'a>
impl<'a> Send for GrammarMergeOptions<'a>
impl<'a> Sync for GrammarMergeOptions<'a>
impl<'a> Unpin for GrammarMergeOptions<'a>
impl<'a> UnsafeUnpin for GrammarMergeOptions<'a>
impl<'a> UnwindSafe for GrammarMergeOptions<'a>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more