swc_core::ecma::utils::swc_common::comments

Trait CommentsExt

pub trait CommentsExt: Comments {
    // Provided methods
    fn with_leading<F, Ret>(&self, pos: BytePos, op: F) -> Ret
       where F: FnOnce(&[Comment]) -> Ret { ... }
    fn with_trailing<F, Ret>(&self, pos: BytePos, op: F) -> Ret
       where F: FnOnce(&[Comment]) -> Ret { ... }
}
๐Ÿ‘ŽDeprecated since 0.13.5: helper methods are merged into Comments itself
Available on crate features __ecma and __utils only.

Provided Methodsยง

fn with_leading<F, Ret>(&self, pos: BytePos, op: F) -> Ret
where F: FnOnce(&[Comment]) -> Ret,

๐Ÿ‘ŽDeprecated since 0.13.5: helper methods are merged into Comments itself

fn with_trailing<F, Ret>(&self, pos: BytePos, op: F) -> Ret
where F: FnOnce(&[Comment]) -> Ret,

๐Ÿ‘ŽDeprecated since 0.13.5: helper methods are merged into Comments itself

Object Safetyยง

This trait is not object safe.

Implementorsยง

ยง

impl<C> CommentsExt for C
where C: Comments,