pub enum Program<'a> {
Mod(Vec<ProgramPart<'a>>),
Script(Vec<ProgramPart<'a>>),
}
Expand description
A fully parsed javascript program.
It is essentially a collection of ProgramPart
s
with a flag denoting if the representation is
a ES6 Mod or a Script.
Variants
Mod(Vec<ProgramPart<'a>>)
An ES6 Mod
Script(Vec<ProgramPart<'a>>)
Not an ES6 Mod
Implementations
sourceimpl<'a> Program<'a>
impl<'a> Program<'a>
pub fn module(parts: Vec<ProgramPart<'a>>) -> Self
pub fn script(parts: Vec<ProgramPart<'a>>) -> Self
Trait Implementations
sourceimpl<'a> PartialEq<Program<'a>> for Program<'a>
impl<'a> PartialEq<Program<'a>> for Program<'a>
impl<'a> StructuralPartialEq for Program<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Program<'a>
impl<'a> Send for Program<'a>
impl<'a> Sync for Program<'a>
impl<'a> Unpin for Program<'a>
impl<'a> UnwindSafe for Program<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more