@@ -75,28 +75,34 @@ pub fn to_code(node: &impl Node) -> String {
7575}
7676
7777pub trait Node : Spanned + Sized {
78- fn emit_with < W , S > ( & self , e : & mut Emitter < ' _ , W , S > ) -> Result
78+ fn emit_with < W , S > ( & self , emitter : & mut Emitter < ' _ , W , S > ) -> Result
7979 where
8080 W : WriteJs ,
8181 S : SourceMapper + SourceMapperExt ;
8282
83- fn with_new_span < W , S > ( & self , e : & mut NodeEmitter < ' _ , W , S > ) -> Result < Self >
83+ fn with_new_span < W , S > ( & self , emitter : & mut NodeEmitter < ' _ , W , S > ) -> Result < Self >
8484 where
8585 W : WriteJs ,
8686 S : SourceMapper + SourceMapperExt ;
8787}
8888
8989impl < N : Node > Node for Box < N > {
90- #[ inline]
91- fn emit_with < W , S > ( & self , e : & mut Emitter < ' _ , W , S > ) -> Result
90+ fn emit_with < W , S > ( & self , emitter : & mut Emitter < ' _ , W , S > ) -> Result
9291 where
9392 W : WriteJs ,
9493 S : SourceMapper + SourceMapperExt ,
9594 {
96- ( * * self ) . emit_with ( e )
95+ ( * * self ) . emit_with ( emitter )
9796 }
98- }
9997
98+ fn with_new_span < W , S > ( & self , emitter : & mut NodeEmitter < ' _ , W , S > ) -> Result < Self >
99+ where
100+ W : WriteJs ,
101+ S : SourceMapper + SourceMapperExt ,
102+ {
103+ Box :: new ( ( * * self ) . with_new_span ( emitter) )
104+ }
105+ }
100106pub struct Emitter < ' a , W , S >
101107where
102108 W : WriteJs ,
0 commit comments