Compile autodocs for the given Java syntax tree. Documents will be
        returned documenting each separate type.
421559
def compile(self, ast):
        

        documents = {}

        imports = util.StringBuilder()
        for imp in ast.imports:
            if imp.static or imp.wildcard:
                continue

            package_parts = []
            cls_parts = []

            for part in imp.path.split('.'):
                if cls_parts or part[0].isupper():
                    cls_parts.append(part)
                else:
                    package_parts.append(part)


            # If the import's final part wasn't capitalized,
            # append it to the class parts anyway so sphinx doesn't complain.
            if cls_parts == []:
                cls_parts.append(package_parts.pop())

            package = '.'.join(package_parts)
            cls = '.'.join(cls_parts)

            imports.append(util.Directive('java:import', package + ' ' + cls).build())
        import_block = imports.build()

        if not ast.package:
            raise ValueError('File must have package declaration')

        package = ast.package.name
        type_declarations = []
        for path, node in ast.filter(javalang.tree.TypeDeclaration):
            if not self.filter(node):
                continue

            classes = [n.name for n in path if isinstance(n, javalang.tree.TypeDeclaration)]
            classes.append(node.name)

            name = '.'.join(classes)
            type_declarations.append((package, name, node))

        for package, name, declaration in type_declarations:
            full_name = package + '.' + name
            document = self.compile_type_document(import_block, package, name, declaration)
            documents[full_name] = (package, name, document.build())
        return documents
1054039
@Override
    public void renderDoc(Doc doc) {
        // hide text that looks like tags (such as annotations in source code) from Javadoc
        doc.setRawCommentText(doc.getRawCommentText().replaceAll("@([A-Z])", "{@literal @}$1"));

        StringBuilder buffer = new StringBuilder();
        buffer.append(render(doc.commentText(), false));
        buffer.append('\n');
        for (Tag tag : doc.tags()) {
            renderTag(tag, buffer);
            buffer.append('\n');
        }
        doc.setRawCommentText(buffer.toString());
    }
139033
function compile( schema, sourceRef, options = {} ) {
      const {
         isFeaturesValidator = false,
         interpolateExpressions = false
      } = options;

      const decorators = [
         translateCustomKeywordFormats
      ];

      if( !schema.$schema ) {
         throw new Error(
            `JSON schema for artifact "${sourceRef}" is missing "$schema" property`
         );
      }
      if( isFeaturesValidator ) {
         if( !schema.type ) {
            throw new Error(
               `JSON schema for artifact "${sourceRef}" is missing "type" property (should be "object")`
            );
         }
         if( schema.type !== 'object' && schema.type !== 'array' ) {
            throw new Error(
               `JSON schema for artifact "${sourceRef}" root element should have type "object"`
            );
         }

         decorators.push( setAdditionalPropertiesDefaults );
         decorators.push( setFirstLevelDefaults );
         decorators.push( extractFeatures );
      }
      if( interpolateExpressions ) {
         decorators.push( schema => {
            applyToSchemas( schema, schema => {
               if( schema.default ) {
                  schema[ AX_INTERPOLATE ] = true;
               }
            } );
         } );
      }

      const decoratedSchema = decorators.reduce( ( schema, decorator ) => {
         return decorator( schema ) || schema;
      }, schema );

      try {
         return ajv.compile( decoratedSchema );
      }
      catch( e ) {
         throw new Error( `Failed to compile JSON schema for artifact "${sourceRef}":\n${e}` );
      }
   }
1158422
def doctree_resolved(app, doctree, fromdocname):
    
    # Skip for non-html or if javascript is not inlined
    if not app.env.config.wavedrom_html_jsinline:
        return

    text = """
    <script type="text/javascript">
        function init() {
            WaveDrom.ProcessAll();
        }
        window.onload = init;
    </script>"""
    doctree.append(nodes.raw(text=text, format='html'))
1332961
def compile(expr, params=None):
    
    from ibis.sql.alchemy import to_sqlalchemy

    return to_sqlalchemy(expr, dialect.make_context(params=params))
869972
function treeToDoc(tree) {
  if (tree.length === 0) return '';

  return tree.map((it) => {
    if (typeof it === 'object') {
      return `${'#'.repeat(it.level)} ${it.title}\n${treeToDoc(it.children)}`;
    }
    return it;
  }).join('\n');
}
863725
def _compile_schema(self, schema):
        
        assert self.matcher == schema.matcher

        self.name = schema.name
        self.compiled_type = schema.compiled_type

        return schema.compiled
697731
def build_java_docs(app):
    """"""
    java_path = app.builder.srcdir + '/../scala-package'
    java_doc_sources = 'find . -type f -name "*.scala" | egrep \"\.\/core|\.\/infer\" | egrep \"\/javaapi\" | egrep -v \"Suite\"'
    java_doc_classpath = ':'.join([
        '`find native -name "*.jar" | grep "target/lib/" | tr "\\n" ":" `',
        '`find macros -name "*.jar" | tr "\\n" ":" `',
        '`find core -name "*.jar" | tr "\\n" ":" `',
        '`find infer -name "*.jar" | tr "\\n" ":" `'
    ])
    _run_cmd('cd {}; scaladoc `{}` -classpath {} -feature -deprecation'
             .format(java_path, java_doc_sources, java_doc_classpath))
    dest_path = app.builder.outdir + '/api/java/docs'
    _run_cmd('rm -rf ' + dest_path)
    _run_cmd('mkdir -p ' + dest_path)
    javadocs = ['index', 'index.html', 'org', 'lib', 'index.js', 'package.html']
    for doc_file in javadocs:
        _run_cmd('cd ' + java_path + ' && mv -f ' + doc_file + ' ' + dest_path + '; exit 0')
102720
def compile_pattern(self, input, debug=False, with_tree=False):
        """"""
        tokens = tokenize_wrapper(input)
        try:
            root = self.driver.parse_tokens(tokens, debug=debug)
        except parse.ParseError as e:
            raise PatternSyntaxError(str(e))
        if with_tree:
            return self.compile_node(root), root
        else:
            return self.compile_node(root)
1374066
public static List<CompiledAutomaton> createAutomata(String prefix,
      String regexp, Map<String, Automaton> automatonMap) throws IOException {
    List<CompiledAutomaton> list = new ArrayList<>();
    Automaton automatonRegexp = null;
    if (regexp != null) {
      RegExp re = new RegExp(prefix + MtasToken.DELIMITER + regexp + "\u0000*");
      automatonRegexp = re.toAutomaton();
    }
    int step = 500;
    List<String> keyList = new ArrayList<>(automatonMap.keySet());
    for (int i = 0; i < keyList.size(); i += step) {
      int localStep = step;
      boolean success = false;
      CompiledAutomaton compiledAutomaton = null;
      while (!success) {
        success = true;
        int next = Math.min(keyList.size(), i + localStep);
        List<Automaton> listAutomaton = new ArrayList<>();
        for (int j = i; j < next; j++) {
          listAutomaton.add(automatonMap.get(keyList.get(j)));
        }
        Automaton automatonList = Operations.union(listAutomaton);
        Automaton automaton;
        if (automatonRegexp != null) {
          automaton = Operations.intersection(automatonList, automatonRegexp);
        } else {
          automaton = automatonList;
        }
        try {
          compiledAutomaton = new CompiledAutomaton(automaton);
        } catch (TooComplexToDeterminizeException e) {
          log.debug(e);
          success = false;
          if (localStep > 1) {
            localStep /= 2;
          } else {
            throw new IOException("TooComplexToDeterminizeException");
          }
        }
      }
      list.add(compiledAutomaton);
    }
    return list;
  }
1347677
def autodoc_process_docstring(app, what, name, obj, options, lines):
    
    # check that only symbols that can be directly imported from ``callee``
    # package are being documented
    _, symbol = name.rsplit('.', 1)
    if symbol not in callee.__all__:
        raise SphinxError(
            "autodoc'd '%s' is not a part of the public API!" % name)

    # for classes exempt from automatic merging of class & __init__ docs,
    # pretend their __init__ methods have no docstring at all,
    # so that nothing will be appended to the class's docstring
    if what == 'class' and name in autoclass_content_exceptions:
        # amusingly, when autodoc reads the constructor's docstring
        # for appending it to class docstring, it will report ``what``
        # as 'class' (again!); hence we must check what it actually read
        ctor_docstring_lines = prepare_docstring(obj.__init__.__doc__)
        if lines == ctor_docstring_lines:
            lines[:] = []
265544
def compile(self):
        '''
        
        '''
        self._prune()
        self._resolve_duplicates()
        self._fix_shapes()
        self._infer_all_types()
        self._check_structure()
762716
@Override @DefinedBy(Api.COMPILER_TREE)
    public DCDocComment newDocCommentTree(List<? extends DocTree> fullBody, List<? extends DocTree> tags) {
        ListBuffer<DCTree> lb = new ListBuffer<>();
        lb.addAll(cast(fullBody));
        List<DCTree> fBody = lb.toList();

        // A dummy comment to keep the diagnostics logic happy.
        Comment c = new Comment() {
            @Override
            public String getText() {
                return null;
            }

            @Override
            public int getSourcePos(int index) {
                return Position.NOPOS;
            }

            @Override
            public CommentStyle getStyle() {
                return CommentStyle.JAVADOC;
            }

            @Override
            public boolean isDeprecated() {
                return false;
            }
        };
        Pair<List<DCTree>, List<DCTree>> pair = splitBody(fullBody);
        DCDocComment tree = new DCDocComment(c, fBody, pair.fst, pair.snd, cast(tags));
        return tree;
    }
117791
def compile_for_aexec(source, filename="<aexec>", mode="single",
                      dont_imply_dedent=False, local={}):
    """"""
    flags = ast.PyCF_ONLY_AST
    if dont_imply_dedent:
        flags |= codeop.PyCF_DONT_IMPLY_DEDENT
    if compat.PY35:
        # Avoid a syntax error by wrapping code with `async def`
        indented = '\n'.join(line and ' ' * 4 + line
                             for line in source.split('\n'))
        coroutine = CORO_DEF + '\n' + indented + '\n'
        interactive = compile(coroutine, filename, mode, flags).body[0]
        # Check EOF errors
        try:
            compile(source, filename, mode, flags)
        except SyntaxError as exc:
            if exc.msg == 'unexpected EOF while parsing':
                raise
    else:
        interactive = compile(source, filename, mode, flags)
    return [make_tree(statement, filename, mode) for
            statement in interactive.body]
349966
function _doc_builder(doc) {
				if(is.object(doc)) {
					ARRAY(methods).forEach(function(method) {
						doc[method.$name] = FUNCTION.parse(method.$body).bind(doc);
					});
				}
				return doc;
			}
810040
def compile(expression, escape_funcs=None, unescape_funcs=None):
    
    return _compile_from_parse_tree(
        parse_regex(tokenize_regex(expression)),
        escape_funcs=escape_funcs,
        unescape_funcs=unescape_funcs)
888159
function Compiler(node, options) {
  this.options = options = options || {};
  this.node = node;
  this.hasCompiledDoctype = false;
  this.hasCompiledTag = false;
  this.pp = options.pretty || false;
  if (this.pp && typeof this.pp !== 'string') {
    this.pp = '  ';
  }
  this.debug = false !== options.compileDebug;
  this.indents = 0;
  this.parentIndents = 0;
  this.terse = false;
  this.mixins = {};
  this.dynamicMixins = false;
  this.eachCount = 0;
  if (options.doctype) this.setDoctype(options.doctype);
  this.runtimeFunctionsUsed = [];
  this.inlineRuntimeFunctions = options.inlineRuntimeFunctions || false;
  if (this.debug && this.inlineRuntimeFunctions) {
    this.runtimeFunctionsUsed.push('rethrow');
  }
  this.codeBuffer = '_=function*(){';
  this.codeMarker = {};
  this.codeIndex = -1;

  this.useGenerators = false;
  this.templateVars = ['locals']

}