Struct swc_ecma_codegen::text_writer::JsWriter
source · [−]pub struct JsWriter<'a, W: Write> { /* private fields */ }
Expand description
Ported from createTextWriter
of the typescript compiler.
https://github.com/Microsoft/TypeScript/blob/45eaf42006/src/compiler/utilities.ts#L2548
Implementations
Trait Implementations
sourceimpl<'a, W: Write> WriteJs for JsWriter<'a, W>
impl<'a, W: Write> WriteJs for JsWriter<'a, W>
fn increase_indent(&mut self) -> Result
fn decrease_indent(&mut self) -> Result
sourcefn write_semi(&mut self, span: Option<Span>) -> Result
fn write_semi(&mut self, span: Option<Span>) -> Result
This may write semicolon.
fn write_space(&mut self) -> Result
fn write_keyword(&mut self, span: Option<Span>, s: &'static str) -> Result
fn write_operator(&mut self, span: Option<Span>, s: &str) -> Result
fn write_param(&mut self, s: &str) -> Result
fn write_property(&mut self, s: &str) -> Result
fn write_line(&mut self) -> Result
fn write_lit(&mut self, span: Span, s: &str) -> Result
fn write_comment(&mut self, s: &str) -> Result
fn write_str_lit(&mut self, span: Span, s: &str) -> Result
fn write_str(&mut self, s: &str) -> Result
fn write_symbol(&mut self, span: Span, s: &str) -> Result
fn write_punct(&mut self, span: Option<Span>, s: &'static str) -> Result
fn care_about_srcmap(&self) -> bool
fn add_srcmap(&mut self, pos: BytePos) -> Result
fn commit_pending_semi(&mut self) -> Result
Auto Trait Implementations
impl<'a, W> RefUnwindSafe for JsWriter<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for JsWriter<'a, W>where
W: Send,
impl<'a, W> Sync for JsWriter<'a, W>where
W: Sync,
impl<'a, W> Unpin for JsWriter<'a, W>where
W: Unpin,
impl<'a, W> !UnwindSafe for JsWriter<'a, W>
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