Export decorator
@param name
@param context
189029
function Export(clazz, name, context) {
    if (name === void 0) { name = clazz.name; }
    if (context === void 0) { context = context_constanst_1.SERVICE_FACTORY_DEFAULT_CONTEXT; }
    // Export clazz if name is set
    service_factory_1.ServiceFactory.export(clazz, name, context);
    /**
     * Modify constructor
     */
    return function (constructor) {
        // Preserve original
        var original = constructor;
        // Construct function
        function construct(constructor) {
            // Create constructor
            var c = function () {
                return constructor.apply(this);
            };
            // Assign prototype
            c.prototype = constructor.prototype;
            // Create new instance
            return service_factory_1.ServiceFactory.export(c, name, context);
        }
        // Constructor behaviour
        var f = function () {
            return construct(original);
        };
        // Copy prototype
        f.prototype = original.prototype;
        // Return new 
        return f;
    };
}
2608
def export(defn):
    """"""
    globals()[defn.__name__] = defn
    __all__.append(defn.__name__)
    return defn
340207
function create(context) {
    return {
        AssignmentExpression(node) {
            if (assignsToExportsProperty(node) && ancestor(isCommonJsWrapper, node)) {
                context.report(node, messages);
            }
        }
    };
}
418728
def wrap_context(func):
    
    @functools.wraps(func)
    def wrapper(self, request, context):
        return func(self, request, LogFieldsContext(context))

    return wrapper
734048
private Context createContext(String name) {
		Context context = new Context(this, this.nextContextIndex++);
		context.setName(name);
		return context;
	}
1042185
public static String exportDictionary(String name, Method method, Object data) throws SerializationException {

        return exportDictionary(name, serialize(method, data));
    }
1057054
public void eInit(SarlScript script, String name, IJvmTypeProvider context) {
		setTypeResolutionContext(context);
		if (this.sarlEnumeration == null) {
			this.container = script;
			this.sarlEnumeration = SarlFactory.eINSTANCE.createSarlEnumeration();
			script.getXtendTypes().add(this.sarlEnumeration);
			this.sarlEnumeration.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendTypeDeclaration());
			if (!Strings.isEmpty(name)) {
				this.sarlEnumeration.setName(name);
			}
		}
	}
324075
def decorator_of_context_manager(ctxt):
    

    def decorator_fn(*outer_args, **outer_kwargs):
        def decorator(fn):
            @functools.wraps(fn)
            def wrapper(*args, **kwargs):
                with ctxt(*outer_args, **outer_kwargs):
                    return fn(*args, **kwargs)

            return wrapper

        return decorator

    if getattr(ctxt, "__doc__", None) is None:
        msg = "Decorator that runs the inner function in the context of %s"
        decorator_fn.__doc__ = msg % ctxt
    else:
        decorator_fn.__doc__ = ctxt.__doc__
    return decorator_fn
44023
public void eInit(SarlScript script, String name, IJvmTypeProvider context) {
		setTypeResolutionContext(context);
		if (this.sarlInterface == null) {
			this.container = script;
			this.sarlInterface = SarlFactory.eINSTANCE.createSarlInterface();
			script.getXtendTypes().add(this.sarlInterface);
			this.sarlInterface.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendTypeDeclaration());
			if (!Strings.isEmpty(name)) {
				this.sarlInterface.setName(name);
			}
		}
	}
89508
protected static function export_data($context, $user) {
        if (!$context) {
            return;
        }
        $contextdata = helper::get_context_data($context, $user);
        helper::export_context_files($context, $user);
        writer::with_context($context)->export_data([], $contextdata);
    }
639369
function buildNamespaceReexport(meta, namespace, checkExport) {
    checkExport();
    return babelTemplate.statement(`
        (function() {
          for (var key in NAMESPACE) {
            if (NAMESPACE == null || !NAMESPACE.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
            VERIFY_NAME_LIST;
            exports[key] = NAMESPACE[key];
          }
        })();
    `)({
        NAMESPACE: namespace,
        VERIFY_NAME_LIST: meta.exportNameListName
            ? babelTemplate.statement(`
                if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
            `)({EXPORTS_LIST: meta.exportNameListName})
            : null
    });
}
818230
public void eInit(XtendExecutable context, String name, IJvmTypeProvider typeContext) {
		this.builder.eInit(context, name, typeContext);
	}
889887
public void eInit(SarlScript script, String name, IJvmTypeProvider context) {
		setTypeResolutionContext(context);
		if (this.sarlBehavior == null) {
			this.sarlBehavior = SarlFactory.eINSTANCE.createSarlBehavior();
			script.getXtendTypes().add(this.sarlBehavior);
			this.sarlBehavior.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendTypeDeclaration());
			if (!Strings.isEmpty(name)) {
				this.sarlBehavior.setName(name);
			}
		}
	}
86780
function create(context) {
    return {
        CallExpression(node) {
            if (isCommonJsWrapper(node)) {
                context.report(node, message);
            }
        }
    };
}
589618
function ExportNamedDeclaration(node, parent, scope) {
    var nodes = [];
    build(node, nodes, scope);
    if (!nodes.length) return;

    if (node.specifiers.length >= 1) {
      nodes.push(node);
    }

    return nodes;
  }
922291
public static String exportDictionary(String name, String data) {

        StringBuffer sb = new StringBuffer();
        sb.append("<meta name=\"").append(name).append("\" content=\"").append(data).append("\" />");
        return sb.toString();
    }
85881
public static function compileDynamic(&$context, $name) {
        if (!$context['flags']['runpart']) {
            return;
        }

        $func = static::compile($context, $context['usedPartial'][$name], $name);

        if (!isset($context['partialCode'][$name]) && $func) {
            $context['partialCode'][$name] = "'$name' => $func";
        }

        return $func;
    }