Struct swc_ecma_codegen::Emitter
source · [−]pub struct Emitter<'a, W> where
W: WriteJs, {
pub cfg: Config,
pub cm: Lrc<SourceMap>,
pub comments: Option<&'a dyn Comments>,
pub wr: W,
}
Fields
cfg: Config
cm: Lrc<SourceMap>
comments: Option<&'a dyn Comments>
wr: W
Implementations
sourceimpl<'a, W> Emitter<'a, W> where
W: WriteJs,
impl<'a, W> Emitter<'a, W> where
W: WriteJs,
pub fn emit_program(&mut self, node: &Program) -> Result
pub fn emit_module(&mut self, node: &Module) -> Result
pub fn emit_script(&mut self, node: &Script) -> Result
pub fn emit_module_item(&mut self, node: &ModuleItem) -> Result
sourcepub fn needs_2dots_for_property_access(&self, expr: &Expr) -> bool
pub fn needs_2dots_for_property_access(&self, expr: &Expr) -> bool
1..toString
is a valid property access, emit a dot after the literal
sourceimpl<'a, W> Emitter<'a, W> where
W: WriteJs,
impl<'a, W> Emitter<'a, W> where
W: WriteJs,
Statements
pub fn emit_module_export_name(&mut self, node: &ModuleExportName) -> Result
Auto Trait Implementations
impl<'a, W> !RefUnwindSafe for Emitter<'a, W>
impl<'a, W> !Send for Emitter<'a, W>
impl<'a, W> !Sync for Emitter<'a, W>
impl<'a, W> Unpin for Emitter<'a, W> where
W: Unpin,
impl<'a, W> !UnwindSafe for Emitter<'a, W>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more