Skip to content

Commit 73e56e4

Browse files
committed
NodeEmitter
1 parent 880b025 commit 73e56e4

File tree

1 file changed

+10
-2
lines changed
  • crates/swc_ecma_codegen/src

1 file changed

+10
-2
lines changed

crates/swc_ecma_codegen/src/lib.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,25 @@ impl<N: Node> Node for Box<N> {
9797
}
9898
}
9999

100-
pub struct Emitter<'a, W, S: SourceMapper>
100+
pub struct Emitter<'a, W, S>
101101
where
102102
W: WriteJs,
103-
S: SourceMapperExt,
103+
S: SourceMapper + SourceMapperExt,
104104
{
105105
pub cfg: config::Config,
106106
pub cm: Lrc<S>,
107107
pub comments: Option<&'a dyn Comments>,
108108
pub wr: W,
109109
}
110110

111+
pub struct NodeEmitter<'a, W, S>
112+
where
113+
W: WriteJs,
114+
S: SourceMapper + SourceMapperExt,
115+
{
116+
emitter: Emitter<'a, W, S>,
117+
}
118+
111119
enum CowStr<'a> {
112120
Borrowed(&'a str),
113121
Owned(CompactString),

0 commit comments

Comments
 (0)