Stringify a unist node representation of a file (in string or vfile representation) into a string using the `Compiler` on the processor.
545610
function stringify(node, doc) {
    var file = vfile(doc)
    var Compiler

    freeze()
    Compiler = processor.Compiler
    assertCompiler('stringify', Compiler)
    assertNode(node)

    if (newable(Compiler)) {
      return new Compiler(node, file).compile()
    }

    return Compiler(node, file) // eslint-disable-line new-cap
  }
30995
def stringify(self, value, **opts):
        
        if self._is_null(value):
            return None
        try:
            opts_ = self.opts.copy()
            opts_.update(opts)
            return self._stringify(value, **opts_)
        except Exception as e:
            if not isinstance(e, ConverterError):
                e = ConverterError(None, exc=e)
            e.converter = self.__class__
            raise e
90172
static private void processHeredocStrings(SimpleNode node,
            List<StringProperty> strings) {

        // If there are any children, then process them in post-traversal order.
        int count = node.jjtGetNumChildren();
        if (count > 0) {
            for (int i = 0; i < count; i++) {
                SimpleNode n = (SimpleNode) node.jjtGetChild(i);

                // If this is a heredoc literal, then actually update the node
                // with the string.
                if (n instanceof ASTOperation) {
                    ASTOperation astop = (ASTOperation) n;
                    if (astop.getOperationType() == OperationType.HEREDOC) {

                        Operation op = astop.getOperation();
                        if (op instanceof LongProperty) {
                            LongProperty lprop = (LongProperty) op;
                            int index = lprop.getValue().intValue();
                            StringProperty sprop = strings.get(index);
                            astop.setOperationType(OperationType.LITERAL);
                            astop.setOperation(sprop);
                        } else {
                            throw new RuntimeException(
                                    "HEREDOC operation doesn't contain LongProperty");
                        }
                    }
                }

                // Alway process any children.
                processHeredocStrings(n, strings);
            }
        }
    }
1234848
function stringify(arr) {
        var f = '';
        for (var i = 0; i < arr.length; i++) {
            f += 'files[' + i + ']=' + querystring.escape(arr[i])
            if (i !== arr.length-1) f += '&';
        }
        return f;
    }
1060304
def string_build(self, data, modname="", path=None):
        """"""
        module = self._data_build(data, modname, path)
        module.file_bytes = data.encode("utf-8")
        return self._post_build(module, "utf-8")
686360
function compile(filename) {
  var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];

  var result;

  opts.filename = filename;

  var optsManager = new _transformationFileOptionsOptionManager2["default"]();
  optsManager.mergeOptions(transformOpts);
  opts = optsManager.init(opts);

  var cacheKey = JSON.stringify(opts) + ":" + babel.version;

  var env = process.env.BABEL_ENV || process.env.NODE_ENV;
  if (env) cacheKey += ":" + env;

  if (cache) {
    var cached = cache[cacheKey];
    if (cached && cached.mtime === mtime(filename)) {
      result = cached;
    }
  }

  if (!result) {
    result = babel.transformFileSync(filename, _lodashObjectExtend2["default"](opts, {
      sourceMap: "both",
      ast: false
    }));
  }

  if (cache) {
    result.mtime = mtime(filename);
    cache[cacheKey] = result;
  }

  maps[filename] = result.map;

  return result.code;
}
515999
def generate(node, environment, name, filename, stream=None,
             defer_init=False):
    """"""
    if not isinstance(node, nodes.Template):
        raise TypeError('Can\'t compile non template nodes')
    generator = CodeGenerator(environment, name, filename, stream, defer_init)
    generator.visit(node)
    if stream is None:
        return generator.stream.getvalue()
1044299
def render_to_string(self, template_file, context):
        """"""
        context = context if context else {}
        if self.object:
            context['object'] = self.object
            context[self.object.__class__.__name__.lower()] = self.object
        return render_to_string(template_file, context, self.request)
392505
def to_string_interpolation(node_or_interp)
      unless node_or_interp.is_a?(Interpolation)
        node = node_or_interp
        return string_literal(node.value.to_s) if node.is_a?(Literal)
        if node.is_a?(StringInterpolation)
          return concat(string_literal(node.quote), concat(node, string_literal(node.quote)))
        end
        return StringInterpolation.new(string_literal(""), node, string_literal(""))
      end

      interp = node_or_interp
      after_string_or_interp =
        if interp.after
          to_string_interpolation(interp.after)
        else
          string_literal("")
        end
      if interp.after && interp.whitespace_after
        after_string_or_interp = concat(string_literal(' '), after_string_or_interp)
      end

      mid_string_or_interp = to_string_interpolation(interp.mid)

      before_string_or_interp =
        if interp.before
          to_string_interpolation(interp.before)
        else
          string_literal("")
        end
      if interp.before && interp.whitespace_before
        before_string_or_interp = concat(before_string_or_interp, string_literal(' '))
      end

      concat(before_string_or_interp, concat(mid_string_or_interp, after_string_or_interp))
    end
422994
function stringifyNode(node)
{
	var result = "<"+node.nodeName;
	var numAttrs = node.attrs.length;
	
	for (var i=0; i<numAttrs; i++)
	{
		result += " "+ node.attrs[i].name +'="'+ node.attrs[i].value +'"';
	}
	
	result += ">";
	
	return result;
}
1125317
def unicodify(filename):
    
    if isinstance(filename, bytes):
        return filename.decode(locale.getpreferredencoding())
    else:
        return filename
582625
def to_string(node):
    
    with io.BytesIO() as f:
        write([node], f)
        return f.getvalue().decode('utf-8')
298709
def make_unary(lineno, operator, operand, func=None, type_=None):
    
    return symbols.UNARY.make_node(lineno, operator, operand, func, type_)
330433
def tree_to_str(root):
    

    xs = []
    for value, node, depth in iter_tree(root):
        template = "{indent}"
        if node is not root:
            template += "case={value}\t"
        if node.attribute is None:
            template += "result={result} -- P={prob:.2}"
        else:
            template += "split by {split}:\t" +\
                        "(partial result={result} -- P={prob:.2})"
        line = template.format(indent="    " * depth,
                               value=value,
                               result=node.result[0],
                               prob=node.result[1],
                               split=str(node.attribute))
        xs.append(line)
    return "\n".join(xs)
1182035
function compile(str, scope) {
  if (!/[\(\){}]/.exec(str)) return literal(str);

  var nodes = compile2(compile1(str), scope || {});

  if (nodes.length === 0) return literal('');
  return foldLiterals(nodes)
    .reduce(function(c, e) {return binaryExpression('+', c, e)});
}
757659
def parseprint(code, filename="<string>", mode="exec", **kwargs):
    """"""
    node = parse(code, mode=mode)   # An ode to the code
    print(dump(node, **kwargs))
663959
def compile(node,
                uri,
                filename=None,
                default_filters=None,
                buffer_filters=None,
                imports=None,
                future_imports=None,
                source_encoding=None,
                generate_magic_comment=True,
                disable_unicode=False,
                strict_undefined=False,
                enable_loop=True,
                reserved_names=frozenset()):

    """"""

    # if on Py2K, push the "source_encoding" string to be
    # a bytestring itself, as we will be embedding it into
    # the generated source and we don't want to coerce the
    # result into a unicode object, in "disable_unicode" mode
    if not compat.py3k and isinstance(source_encoding, compat.text_type):
        source_encoding = source_encoding.encode(source_encoding)


    buf = util.FastEncodingBuffer()

    printer = PythonPrinter(buf)
    _GenerateRenderMethod(printer,
                            _CompileContext(uri,
                                            filename,
                                            default_filters,
                                            buffer_filters,
                                            imports,
                                            future_imports,
                                            source_encoding,
                                            generate_magic_comment,
                                            disable_unicode,
                                            strict_undefined,
                                            enable_loop,
                                            reserved_names),
                                node)
    return buf.getvalue()