[][src]Trait swc_ecma_codegen::text_writer::WriteJs

pub trait WriteJs {
    pub fn increase_indent(&mut self) -> Result;
pub fn decrease_indent(&mut self) -> Result;
pub fn write_semi(&mut self) -> Result;
pub fn write_space(&mut self) -> Result;
pub fn write_keyword(
        &mut self,
        span: Option<Span>,
        s: &'static str
    ) -> Result;
pub fn write_operator(&mut self, s: &str) -> Result;
pub fn write_param(&mut self, s: &str) -> Result;
pub fn write_property(&mut self, s: &str) -> Result;
pub fn write_line(&mut self) -> Result;
pub fn write_lit(&mut self, span: Span, s: &str) -> Result;
pub fn write_comment(&mut self, span: Span, s: &str) -> Result;
pub fn write_str_lit(&mut self, span: Span, s: &str) -> Result;
pub fn write_str(&mut self, s: &str) -> Result;
pub fn write_symbol(&mut self, span: Span, s: &str) -> Result;
pub fn write_punct(&mut self, s: &'static str) -> Result; }

Ecmascript writer.

Ported from EmitWriteJs.

Required methods

pub fn increase_indent(&mut self) -> Result[src]

pub fn decrease_indent(&mut self) -> Result[src]

pub fn write_semi(&mut self) -> Result[src]

This may write semicolon.

pub fn write_space(&mut self) -> Result[src]

pub fn write_keyword(&mut self, span: Option<Span>, s: &'static str) -> Result[src]

pub fn write_operator(&mut self, s: &str) -> Result[src]

pub fn write_param(&mut self, s: &str) -> Result[src]

pub fn write_property(&mut self, s: &str) -> Result[src]

pub fn write_line(&mut self) -> Result[src]

pub fn write_lit(&mut self, span: Span, s: &str) -> Result[src]

pub fn write_comment(&mut self, span: Span, s: &str) -> Result[src]

pub fn write_str_lit(&mut self, span: Span, s: &str) -> Result[src]

pub fn write_str(&mut self, s: &str) -> Result[src]

pub fn write_symbol(&mut self, span: Span, s: &str) -> Result[src]

pub fn write_punct(&mut self, s: &'static str) -> Result[src]

Loading content...

Implementations on Foreign Types

impl<W: ?Sized> WriteJs for Box<W> where
    W: WriteJs
[src]

Loading content...

Implementors

impl<'a, W: Write> WriteJs for JsWriter<'a, W>[src]

Loading content...