Struct netsblox_ast::ParserBuilder
source · [−]pub struct ParserBuilder { /* private fields */ }Expand description
Builder for Parser.
Implementations
sourceimpl ParserBuilder
impl ParserBuilder
sourcepub fn optimize(&mut self, value: bool) -> &mut Self
pub fn optimize(&mut self, value: bool) -> &mut Self
If true, the emitted syntax tree will be processed by static optimizations.
Defaults to false.
sourcepub fn omit_nonhat_scripts(&mut self, value: bool) -> &mut Self
pub fn omit_nonhat_scripts(&mut self, value: bool) -> &mut Self
If true, the parser will skip script blocks that lack a hat block.
This is typically desirable since free floating blocks are never automatically executed,
and thus are typically not needed for translation efforts.
Defaults to true.
sourcepub fn adjust_to_zero_index(&mut self, value: bool) -> &mut Self
pub fn adjust_to_zero_index(&mut self, value: bool) -> &mut Self
If true, the emitted syntax tree will be automatically adjusted to support
convenient translation into languages with zero-based indexing.
For instance, with this enabled, an item X of _ block will emit X-1 as the index rather than X, and similar for other list-based blocks.
Defaults to false.
Trait Implementations
sourceimpl Clone for ParserBuilder
impl Clone for ParserBuilder
sourcefn clone(&self) -> ParserBuilder
fn clone(&self) -> ParserBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ParserBuilder
impl !Send for ParserBuilder
impl !Sync for ParserBuilder
impl Unpin for ParserBuilder
impl !UnwindSafe for ParserBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more