Struct ezno_parser::types::declares::DeclareVariableDeclaration
source · pub struct DeclareVariableDeclaration {
pub keyword: DeclareVariableKeyword,
pub declarations: Vec<VariableDeclarationItem<Option<Expression>>>,
pub position: Span,
pub decorators: Vec<Decorator>,
}
Expand description
A declare var/let/const
thingy.
Fields§
§keyword: DeclareVariableKeyword
§declarations: Vec<VariableDeclarationItem<Option<Expression>>>
TODO expressions advised against, but still parse
position: Span
§decorators: Vec<Decorator>
Implementations§
source§impl DeclareVariableDeclaration
impl DeclareVariableDeclaration
pub fn from_reader_sub_declare( reader: &mut impl TokenReader<TSXToken, TokenStart>, state: &mut ParsingState, options: &ParseOptions, start: Option<TokenStart>, decorators: Vec<Decorator> ) -> ParseResult<Self>
Trait Implementations§
source§impl ASTNode for DeclareVariableDeclaration
impl ASTNode for DeclareVariableDeclaration
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 Clone for DeclareVariableDeclaration
impl Clone for DeclareVariableDeclaration
source§fn clone(&self) -> DeclareVariableDeclaration
fn clone(&self) -> DeclareVariableDeclaration
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DeclareVariableDeclaration
impl Debug for DeclareVariableDeclaration
source§impl From<DeclareVariableDeclaration> for Declaration
impl From<DeclareVariableDeclaration> for Declaration
source§fn from(item: DeclareVariableDeclaration) -> Declaration
fn from(item: DeclareVariableDeclaration) -> Declaration
Converts to this type from the input type.
source§impl PartialEq for DeclareVariableDeclaration
impl PartialEq for DeclareVariableDeclaration
source§fn eq(&self, other: &DeclareVariableDeclaration) -> bool
fn eq(&self, other: &DeclareVariableDeclaration) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl SelfRustTokenize for DeclareVariableDeclaration
impl SelfRustTokenize for DeclareVariableDeclaration
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 DeclareVariableDeclaration> for &'try_into_ref Declaration
impl<'try_into_ref> TryInto<&'try_into_ref DeclareVariableDeclaration> for &'try_into_ref Declaration
§type Error = &'try_into_ref Declaration
type Error = &'try_into_ref Declaration
The type returned in the event of a conversion error.
source§impl<'try_into_ref> TryInto<&'try_into_ref mut DeclareVariableDeclaration> for &'try_into_ref mut Declaration
impl<'try_into_ref> TryInto<&'try_into_ref mut DeclareVariableDeclaration> for &'try_into_ref mut Declaration
§type Error = &'try_into_ref mut Declaration
type Error = &'try_into_ref mut Declaration
The type returned in the event of a conversion error.
source§impl Visitable for DeclareVariableDeclaration
impl Visitable for DeclareVariableDeclaration
fn visit<TData>( &self, _visitors: &mut (impl VisitorReceiver<TData> + ?Sized), _data: &mut TData, _options: &VisitSettings, _chain: &mut Annex<'_, Chain> )
fn visit_mut<TData>( &mut self, _visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), _data: &mut TData, _options: &VisitSettings, _chain: &mut Annex<'_, Chain> )
impl Eq for DeclareVariableDeclaration
impl StructuralEq for DeclareVariableDeclaration
impl StructuralPartialEq for DeclareVariableDeclaration
Auto Trait Implementations§
impl RefUnwindSafe for DeclareVariableDeclaration
impl Send for DeclareVariableDeclaration
impl Sync for DeclareVariableDeclaration
impl Unpin for DeclareVariableDeclaration
impl UnwindSafe for DeclareVariableDeclaration
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