pub struct Program {
pub kind: ProgramKind,
pub body: Vec<Stmt>,
pub span: Span,
pub strict: bool,
}Expand description
A whole program: a script or a module.
Fields§
§kind: ProgramKindScript or module.
body: Vec<Stmt>Top-level statements (ScriptBody / ModuleItemList).
span: SpanWhole-source range.
strict: boolWhether the program is strict (modules always are).
Trait Implementations§
impl StructuralPartialEq for Program
Auto Trait Implementations§
impl Forget for Program
impl Freeze for Program
impl Move for Program
impl RefUnwindSafe for Program
impl Send for Programwhere
RawVecInner: Send,
BoxRaw<Expr>: Send,
BoxRaw<Stmt>: Send,
BoxRaw<RestElement>: Send,
BoxRaw<Pattern>: Send,
BoxRaw<MemberPattern>: Send,
BoxRaw<Function>: Send,
BoxRaw<Class>: Send,
BoxRaw<ImportDecl>: Send,
BoxRaw<ExportDecl>: Send,
impl Sync for Programwhere
RawVecInner: Sync,
BoxRaw<Expr>: Sync,
BoxRaw<Stmt>: Sync,
BoxRaw<RestElement>: Sync,
BoxRaw<Pattern>: Sync,
BoxRaw<MemberPattern>: Sync,
BoxRaw<Function>: Sync,
BoxRaw<Class>: Sync,
BoxRaw<ImportDecl>: Sync,
BoxRaw<ExportDecl>: Sync,
impl Unpin for Program
impl UnsafeUnpin for Program
impl UnwindSafe for Programwhere
RawVecInner: UnwindSafe,
BoxRaw<Expr>: UnwindSafe,
BoxRaw<Stmt>: UnwindSafe,
BoxRaw<RestElement>: UnwindSafe,
BoxRaw<Pattern>: UnwindSafe,
BoxRaw<MemberPattern>: UnwindSafe,
BoxRaw<Function>: UnwindSafe,
BoxRaw<Class>: UnwindSafe,
BoxRaw<ImportDecl>: UnwindSafe,
BoxRaw<ExportDecl>: UnwindSafe,
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