[−][src]Struct swc_ecma_codegen::text_writer::JsWriter
Ported from createTextWriter
of the typescript compiler.
https://github.com/Microsoft/TypeScript/blob/45eaf42006/src/compiler/utilities.ts#L2548
Implementations
impl<'a, W: Write> JsWriter<'a, W>
[src]
pub fn new(
cm: Arc<SourceMap>,
new_line: &'a str,
wr: W,
srcmap: Option<&'a mut Vec<(BytePos, LineCol)>>
) -> Self
[src]
cm: Arc<SourceMap>,
new_line: &'a str,
wr: W,
srcmap: Option<&'a mut Vec<(BytePos, LineCol)>>
) -> Self
Trait Implementations
impl<'a, W: Write> WriteJs for JsWriter<'a, W>
[src]
fn increase_indent(&mut self) -> Result
[src]
fn decrease_indent(&mut self) -> Result
[src]
fn write_semi(&mut self) -> Result
[src]
fn write_space(&mut self) -> Result
[src]
fn write_keyword(&mut self, span: Option<Span>, s: &'static str) -> Result
[src]
fn write_operator(&mut self, s: &str) -> Result
[src]
fn write_param(&mut self, s: &str) -> Result
[src]
fn write_property(&mut self, s: &str) -> Result
[src]
fn write_line(&mut self) -> Result
[src]
fn write_lit(&mut self, span: Span, s: &str) -> Result
[src]
fn write_comment(&mut self, span: Span, s: &str) -> Result
[src]
fn write_str_lit(&mut self, span: Span, s: &str) -> Result
[src]
fn write_str(&mut self, s: &str) -> Result
[src]
fn write_symbol(&mut self, span: Span, s: &str) -> Result
[src]
fn write_punct(&mut self, s: &'static str) -> Result
[src]
Auto Trait Implementations
impl<'a, W> !RefUnwindSafe for JsWriter<'a, W>
impl<'a, W> Send for JsWriter<'a, W> where
W: Send,
W: Send,
impl<'a, W> Sync for JsWriter<'a, W> where
W: Sync,
W: Sync,
impl<'a, W> Unpin for JsWriter<'a, W> where
W: Unpin,
W: Unpin,
impl<'a, W> !UnwindSafe for JsWriter<'a, W>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,