pub enum ParserDirectiveContext {
Default,
TopLevel,
PackageBlock,
ClassBlock {
name: String,
},
InterfaceBlock,
EnumBlock,
ConstructorBlock {
super_statement_found: Rc<Cell<bool>>,
},
WithControl {
super_statement_found: Option<Rc<Cell<bool>>>,
to_be_labeled: Option<String>,
control_context: ParserControlFlowContext,
labels: HashMap<String, ParserControlFlowContext>,
},
}
Variants§
Implementations§
Source§impl ParserDirectiveContext
impl ParserDirectiveContext
pub fn may_contain_super_statement(&self) -> bool
pub fn super_statement_found(&self) -> bool
pub fn set_super_statement_found(&self, value: bool)
pub fn function_name_is_constructor(&self, name: &(String, Location)) -> bool
pub fn is_top_level_or_package(&self) -> bool
pub fn is_type_block(&self) -> bool
pub fn clone_control(&self) -> Self
pub fn override_control_context( &self, label_only: bool, context: ParserControlFlowContext, ) -> Self
pub fn put_label(&self, label: String) -> Self
pub fn is_label_defined(&self, label: String) -> bool
pub fn resolve_label(&self, label: String) -> Option<ParserControlFlowContext>
pub fn is_break_allowed(&self, label: Option<String>) -> bool
pub fn is_continue_allowed(&self, label: Option<String>) -> bool
Trait Implementations§
Source§impl Clone for ParserDirectiveContext
impl Clone for ParserDirectiveContext
Source§fn clone(&self) -> ParserDirectiveContext
fn clone(&self) -> ParserDirectiveContext
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ParserDirectiveContext
impl !RefUnwindSafe for ParserDirectiveContext
impl !Send for ParserDirectiveContext
impl !Sync for ParserDirectiveContext
impl Unpin for ParserDirectiveContext
impl !UnwindSafe for ParserDirectiveContext
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.