:mod:`lookout.style.format.langs.__main__` ========================================== .. py:module:: lookout.style.format.langs.__main__ .. autoapi-nested-parse:: Tooling to generate language specific resources. Module Contents --------------- .. function:: parse_args() Parse arguments into an argparse.Namespace. .. function:: extract_node_token(file:str, node:bblfsh.Node) Extract a token from a babelfish node. :param file: File from which the node was parsed. :param node: Node from which to extract a token. :return: Extracted token. .. function:: analyze_uast(path:str, content:str, root:bblfsh.Node, internal_types:dict, roles:dict, reserved:set) Fill internal types, roles and reserved dictionaries with statistics computed from an UAST. :param path: Path of the analyzed file. :param content: Content of the analyzed file. :param root: UAST of the analyzed file. :param internal_types: Dictionary containing the internal types statistics. :param roles: Dictionary containing the roles statistics. :param reserved: Dictionary containing the reserved (or tokens) statistics. .. function:: generate_files(outdir:str, internal_types:dict, roles:dict, reserved:set) Generate roles and tokens statistics modules. :param outdir: Output directory in which to write the computed statistics. :param internal_types: Internal types statistics dictionary. :param roles: Roles statistics dictionary. :param reserved: Reserved (or tokens) statistics dictionary. .. function:: main() Entry point.