Struct dprint_swc_ecma_ast_view::Script [−][src]
pub struct Script<'a> { pub source_file: Option<&'a dyn SourceFile>, pub tokens: Option<&'a TokenContainer<'a>>, pub comments: Option<&'a CommentContainer<'a>>, pub inner: &'a Script, pub body: Vec<Stmt<'a>>, }
Fields
source_file: Option<&'a dyn SourceFile>
tokens: Option<&'a TokenContainer<'a>>
comments: Option<&'a CommentContainer<'a>>
inner: &'a Script
body: Vec<Stmt<'a>>
Implementations
Trait Implementations
fn ancestors(&self) -> AncestorIterator<'a>ⓘNotable traits for AncestorIterator<'a>impl<'a> Iterator for AncestorIterator<'a> type Item = Node<'a>;
Notable traits for AncestorIterator<'a>
impl<'a> Iterator for AncestorIterator<'a> type Item = Node<'a>;
Gets the previous siblings in the order they appear in the file.
Gets the next siblings in the order they appear in the file.
fn leading_comments(&self) -> CommentsIterator<'a>ⓘNotable traits for CommentsIterator<'a>impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
Notable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
fn trailing_comments(&self) -> CommentsIterator<'a>ⓘNotable traits for CommentsIterator<'a>impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
Notable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
Gets the root node if the view was created from a Module; otherwise panics.
Gets the root node if the view was created from a Script; otherwise panics.
Gets the previous tokens in the order they appear in the file.
Gets the next tokens in the order they appear in the file.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Script<'a>
impl<'a> !UnwindSafe for Script<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more