Enum ezno_parser::statements::Statement
source · pub enum Statement {
Show 19 variants
Expression(MultipleExpression),
Block(Block),
Debugger(Span),
IfStatement(IfStatement),
ForLoopStatement(ForLoopStatement),
SwitchStatement(SwitchStatement),
WhileStatement(WhileStatement),
DoWhileStatement(DoWhileStatement),
TryCatchStatement(TryCatchStatement),
Return(ReturnStatement),
Continue(Option<String>, Span),
Break(Option<String>, Span),
Throw(ThrowStatement),
Comment(String, Span),
MultiLineComment(String, Span),
Labelled {
position: Span,
name: String,
statement: Box<Statement>,
},
VarVariable(VarVariableStatement),
Empty(Span),
Cursor(CursorId<Statement>, Span),
}
Expand description
A statement
Variants§
Expression(MultipleExpression)
Block(Block)
{ … } statement
Debugger(Span)
IfStatement(IfStatement)
ForLoopStatement(ForLoopStatement)
SwitchStatement(SwitchStatement)
WhileStatement(WhileStatement)
DoWhileStatement(DoWhileStatement)
TryCatchStatement(TryCatchStatement)
Return(ReturnStatement)
Continue(Option<String>, Span)
Break(Option<String>, Span)
Throw(ThrowStatement)
e.g throw ...
Comment(String, Span)
MultiLineComment(String, Span)
Labelled
VarVariable(VarVariableStatement)
Empty(Span)
Cursor(CursorId<Statement>, Span)
TODO under cfg
Implementations§
Trait Implementations§
source§impl ASTNode for Statement
impl ASTNode for Statement
source§fn get_position(&self) -> &Span
fn get_position(&self) -> &Span
Returns position of node as span AS IT WAS PARSED. May be Span::NULL if AST was doesn’t match anything in source
fn from_reader( reader: &mut impl TokenReader<TSXToken, TokenStart>, state: &mut ParsingState, options: &ParseOptions ) -> ParseResult<Self>
fn to_string_from_buffer<T: ToString>( &self, buf: &mut T, options: &ToStringOptions, depth: u8 )
source§fn from_string(
script: String,
options: ParseOptions,
source: SourceId,
offset: Option<u32>
) -> ParseResult<Self>
fn from_string( script: String, options: ParseOptions, source: SourceId, offset: Option<u32> ) -> ParseResult<Self>
From string, with default impl to call abstract method from_reader
source§fn to_string(&self, options: &ToStringOptions) -> String
fn to_string(&self, options: &ToStringOptions) -> String
Returns structure as valid string
source§impl<'a> From<&'a Statement> for StatementOrDeclarationRef<'a>
impl<'a> From<&'a Statement> for StatementOrDeclarationRef<'a>
source§impl<'a> From<&'a mut Statement> for StatementOrDeclarationMut<'a>
impl<'a> From<&'a mut Statement> for StatementOrDeclarationMut<'a>
source§impl From<DoWhileStatement> for Statement
impl From<DoWhileStatement> for Statement
source§fn from(item: DoWhileStatement) -> Statement
fn from(item: DoWhileStatement) -> Statement
Converts to this type from the input type.
source§impl From<ForLoopStatement> for Statement
impl From<ForLoopStatement> for Statement
source§fn from(item: ForLoopStatement) -> Statement
fn from(item: ForLoopStatement) -> Statement
Converts to this type from the input type.
source§impl From<IfStatement> for Statement
impl From<IfStatement> for Statement
source§fn from(item: IfStatement) -> Statement
fn from(item: IfStatement) -> Statement
Converts to this type from the input type.
source§impl From<MultipleExpression> for Statement
impl From<MultipleExpression> for Statement
source§fn from(item: MultipleExpression) -> Statement
fn from(item: MultipleExpression) -> Statement
Converts to this type from the input type.
source§impl From<ReturnStatement> for Statement
impl From<ReturnStatement> for Statement
source§fn from(item: ReturnStatement) -> Statement
fn from(item: ReturnStatement) -> Statement
Converts to this type from the input type.
source§impl From<Statement> for BlockOrSingleStatement
impl From<Statement> for BlockOrSingleStatement
source§impl From<SwitchStatement> for Statement
impl From<SwitchStatement> for Statement
source§fn from(item: SwitchStatement) -> Statement
fn from(item: SwitchStatement) -> Statement
Converts to this type from the input type.
source§impl From<ThrowStatement> for Statement
impl From<ThrowStatement> for Statement
source§fn from(item: ThrowStatement) -> Statement
fn from(item: ThrowStatement) -> Statement
Converts to this type from the input type.
source§impl From<TryCatchStatement> for Statement
impl From<TryCatchStatement> for Statement
source§fn from(item: TryCatchStatement) -> Statement
fn from(item: TryCatchStatement) -> Statement
Converts to this type from the input type.
source§impl From<VarVariableStatement> for Statement
impl From<VarVariableStatement> for Statement
source§fn from(item: VarVariableStatement) -> Statement
fn from(item: VarVariableStatement) -> Statement
Converts to this type from the input type.
source§impl From<WhileStatement> for Statement
impl From<WhileStatement> for Statement
source§fn from(item: WhileStatement) -> Statement
fn from(item: WhileStatement) -> Statement
Converts to this type from the input type.
source§impl PartialEq for Statement
impl PartialEq for Statement
source§impl SelfRustTokenize for Statement
impl SelfRustTokenize for Statement
fn append_to_token_stream(&self, token_stream: &mut TokenStream)
source§fn to_tokens(&self) -> TokenStream
fn to_tokens(&self) -> TokenStream
Returns the tokens used to construct self
source§impl<'try_into_ref> TryInto<&'try_into_ref DoWhileStatement> for &'try_into_ref Statement
impl<'try_into_ref> TryInto<&'try_into_ref DoWhileStatement> for &'try_into_ref Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref ForLoopStatement> for &'try_into_ref Statement
impl<'try_into_ref> TryInto<&'try_into_ref ForLoopStatement> for &'try_into_ref Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref IfStatement> for &'try_into_ref Statement
impl<'try_into_ref> TryInto<&'try_into_ref IfStatement> for &'try_into_ref Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref MultipleExpression> for &'try_into_ref Statement
impl<'try_into_ref> TryInto<&'try_into_ref MultipleExpression> for &'try_into_ref Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref ReturnStatement> for &'try_into_ref Statement
impl<'try_into_ref> TryInto<&'try_into_ref ReturnStatement> for &'try_into_ref Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref SwitchStatement> for &'try_into_ref Statement
impl<'try_into_ref> TryInto<&'try_into_ref SwitchStatement> for &'try_into_ref Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref ThrowStatement> for &'try_into_ref Statement
impl<'try_into_ref> TryInto<&'try_into_ref ThrowStatement> for &'try_into_ref Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref TryCatchStatement> for &'try_into_ref Statement
impl<'try_into_ref> TryInto<&'try_into_ref TryCatchStatement> for &'try_into_ref Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref VarVariableStatement> for &'try_into_ref Statement
impl<'try_into_ref> TryInto<&'try_into_ref VarVariableStatement> for &'try_into_ref Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref WhileStatement> for &'try_into_ref Statement
impl<'try_into_ref> TryInto<&'try_into_ref WhileStatement> for &'try_into_ref Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref mut DoWhileStatement> for &'try_into_ref mut Statement
impl<'try_into_ref> TryInto<&'try_into_ref mut DoWhileStatement> for &'try_into_ref mut Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref mut ForLoopStatement> for &'try_into_ref mut Statement
impl<'try_into_ref> TryInto<&'try_into_ref mut ForLoopStatement> for &'try_into_ref mut Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref mut IfStatement> for &'try_into_ref mut Statement
impl<'try_into_ref> TryInto<&'try_into_ref mut IfStatement> for &'try_into_ref mut Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref mut MultipleExpression> for &'try_into_ref mut Statement
impl<'try_into_ref> TryInto<&'try_into_ref mut MultipleExpression> for &'try_into_ref mut Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref mut ReturnStatement> for &'try_into_ref mut Statement
impl<'try_into_ref> TryInto<&'try_into_ref mut ReturnStatement> for &'try_into_ref mut Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref mut SwitchStatement> for &'try_into_ref mut Statement
impl<'try_into_ref> TryInto<&'try_into_ref mut SwitchStatement> for &'try_into_ref mut Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref mut ThrowStatement> for &'try_into_ref mut Statement
impl<'try_into_ref> TryInto<&'try_into_ref mut ThrowStatement> for &'try_into_ref mut Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref mut TryCatchStatement> for &'try_into_ref mut Statement
impl<'try_into_ref> TryInto<&'try_into_ref mut TryCatchStatement> for &'try_into_ref mut Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref mut VarVariableStatement> for &'try_into_ref mut Statement
impl<'try_into_ref> TryInto<&'try_into_ref mut VarVariableStatement> for &'try_into_ref mut Statement
source§impl<'try_into_ref> TryInto<&'try_into_ref mut WhileStatement> for &'try_into_ref mut Statement
impl<'try_into_ref> TryInto<&'try_into_ref mut WhileStatement> for &'try_into_ref mut Statement
source§impl Visitable for Statement
impl Visitable for Statement
fn visit<TData>( &self, visitors: &mut (impl VisitorReceiver<TData> + ?Sized), data: &mut TData, settings: &VisitSettings, chain: &mut Annex<'_, Chain> )
fn visit_mut<TData>( &mut self, visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), data: &mut TData, settings: &VisitSettings, chain: &mut Annex<'_, Chain> )
impl Eq for Statement
Auto Trait Implementations§
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
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