Ejemplo n.º 1
0
        public override AstNode ShallowClone()
        {
            var res = new AstToplevel(Source, Start, End);

            res.Body.AddRange(Body.AsReadOnlySpan());
            res.HasUseStrictDirective = HasUseStrictDirective;
            return(res);
        }
Ejemplo n.º 2
0
 public static (AstToplevel toplevel, AstSymbolVar?symbol) IfPossibleEmitModuleExportsJsWrapper(
     AstToplevel toplevel,
     string?varName = null)
 {
     varName ??= "exports";
     if (toplevel.Globals !["module"].References.Count != 1)