Trait swc_ecma_codegen::text_writer::WriteJs [−][src]
Ecmascript writer.
Ported from EmitWriteJs
.
Required methods
fn increase_indent(&mut self) -> Result
[src]
fn decrease_indent(&mut self) -> Result
[src]
fn write_semi(&mut self) -> Result
[src]
This may write semicolon.
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]
Provided methods
fn target(&self) -> JscTarget
[src]
Returns javascript target which should be used while generating code.
This defaults to JscTarget::Es2020 because it preserves input as much as possible.
Implementor should return same value regardless how much time it is called.
Implementations on Foreign Types
impl<W: ?Sized> WriteJs for Box<W> where
W: WriteJs,
[src]
W: WriteJs,