pub struct JsEmitContext {
pub indent_level: usize,
pub indent_str: String,
pub source_map: JsSourceMap,
pub current_line: u32,
pub current_col: u32,
pub in_async: bool,
}Expand description
Context maintained during JS code emission.
Fields§
§indent_level: usizeCurrent indentation level.
indent_str: StringIndentation string per level.
source_map: JsSourceMapSource map being built.
current_line: u32Current output line number.
current_col: u32Current output column.
in_async: boolWhether we are inside an async function.
Implementations§
Source§impl JsEmitContext
impl JsEmitContext
Sourcepub fn push_indent(&mut self)
pub fn push_indent(&mut self)
Increase indentation.
Sourcepub fn pop_indent(&mut self)
pub fn pop_indent(&mut self)
Decrease indentation.
Sourcepub fn record_mapping(&mut self, fn_name: &str, source_line: u32)
pub fn record_mapping(&mut self, fn_name: &str, source_line: u32)
Record a source map entry for the current position.
Auto Trait Implementations§
impl Freeze for JsEmitContext
impl RefUnwindSafe for JsEmitContext
impl Send for JsEmitContext
impl Sync for JsEmitContext
impl Unpin for JsEmitContext
impl UnsafeUnpin for JsEmitContext
impl UnwindSafe for JsEmitContext
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