pub struct DeclareVariableDeclaration {
pub keyword: VariableKeyword,
pub declarations: Vec<VariableDeclarationItem<Option<Expression>>>,
pub position: Span,
pub decorators: Vec<Decorator>,
}
Expand description
A declare var/let/const
thingy.
Fields§
§keyword: VariableKeyword
§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 sourcefn 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, local: LocalToStringInformation, )
Source§fn from_string(script: String, options: ParseOptions) -> ParseResult<Self>
fn from_string(script: String, options: ParseOptions) -> ParseResult<Self>
From string, with default impl to call abstract method
from_reader
fn from_string_with_options( script: String, options: ParseOptions, offset: Option<u32>, ) -> ParseResult<(Self, ParsingState)>
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) -> Self
fn from(item: DeclareVariableDeclaration) -> Self
Converts to this type from the input type.
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
Source§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
Source§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: &VisitOptions, _chain: &mut Annex<'_, Chain>, )
fn visit_mut<TData>( &mut self, _visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), _data: &mut TData, _options: &VisitOptions, _chain: &mut Annex<'_, Chain>, )
impl StructuralPartialEq for DeclareVariableDeclaration
Auto Trait Implementations§
impl Freeze for DeclareVariableDeclaration
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