public override AstNode ShallowClone() { var res = new AstToplevel(Source, Start, End); res.Body.AddRange(Body.AsReadOnlySpan()); res.HasUseStrictDirective = HasUseStrictDirective; return(res); }
public static (AstToplevel toplevel, AstSymbolVar?symbol) IfPossibleEmitModuleExportsJsWrapper( AstToplevel toplevel, string?varName = null) { varName ??= "exports"; if (toplevel.Globals !["module"].References.Count != 1)