Struct resast::stmt::WithStmt [−][src]
Expand description
A with statement, this puts one object at the top of the identifier search tree.
note: this cannot be used in a strict context
function random() {
return 0;
}
let rand;
with (Math) {
rand = floor(random() * 100) + 1;
}
//rand !== 0
Fields
object: Expr<'a>
body: Box<Stmt<'a>>
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for WithStmt<'a>
impl<'a> UnwindSafe for WithStmt<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more