예제 #1
0
        public override AstNode ShallowClone()
        {
            var res = new AstToplevel(Source, Start, End);

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