pub struct Builder { /* private fields */ }Expand description
Configures grammar compilation and Rust source generation.
Implementations§
Source§impl Builder
impl Builder
pub fn new() -> Self
pub fn grammar(self, path: impl AsRef<Path>) -> Self
pub fn grammars(self, paths: impl IntoIterator<Item = impl AsRef<Path>>) -> Self
pub fn library_directory(self, path: impl AsRef<Path>) -> Self
pub fn out_dir(self, path: impl AsRef<Path>) -> Self
pub const fn action_mode(self, mode: ActionMode) -> Self
pub const fn require_generated_parser(self, enabled: bool) -> Self
pub const fn allow_unsupported_lexer_actions(self, enabled: bool) -> Self
pub const fn unknown_semantics(self, policy: UnknownSemanticPolicy) -> Self
pub fn semantic_patterns(self, path: impl AsRef<Path>) -> Self
pub const fn require_full_semantics(self, enabled: bool) -> Self
pub fn option_hook(self, assignment: impl Into<String>) -> Self
pub const fn generate_listener(self, enabled: bool) -> Self
pub const fn generate_visitor(self, enabled: bool) -> Self
pub const fn fixed_lookahead(self, depth: usize) -> Self
pub fn entry_rule(self, name: impl Into<String>) -> Self
pub const fn prune_unreachable(self, enabled: bool) -> Self
pub const fn optimize_precedence_ladders(self, enabled: bool) -> Self
pub const fn report_precedence_ladders(self, enabled: bool) -> Self
pub fn generate(self) -> Result<Generation, Error>
Trait Implementations§
impl Eq for Builder
impl StructuralPartialEq for Builder
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.