"""
This type stub file was generated by pyright.
"""

from typing import Union
from tree_sitter import Language, Node as TSNode, Parser

PY_LANGUAGE = ...
JS_LANGUAGE = ...
TS_LANGUAGE = ...
TSX_LANGUAGE = ...
def to_extension(filepath_or_extension: str) -> str:
    ...

class _TreeSitterAbstraction:
    """Class to facilitate loading/retrieval of the Parser object for a given language.
    Should not be used directly, instead use `get_tree_sitter_parser` to get the parser for a given extension.
    """
    _instance: Union[_TreeSitterAbstraction, None] = ...
    extension_to_lang = ...
    extension_to_parser: dict[str, Parser] = ...
    def __init__(self) -> None:
        ...
    
    def initialize_parsers(self) -> None:
        ...
    


_ts_parser_factory = ...
def get_parser_by_filepath_or_extension(filepath_or_extension: str = ...) -> Parser:
    ...

def get_lang_by_filepath_or_extension(filepath_or_extension: str = ...) -> Language:
    ...

def parse_file(filepath: str, content: str) -> TSNode:
    ...

def print_errors(filepath: str, content: str) -> None:
    ...

