langs¶
various algorithms//utils for modifying bytes
- ptcx.utils.langs.get_parser(lang)View on GitHub ¶
tree_sitter.Parser
based onlang
- ptcx.utils.langs.guess(path, content=None)View on GitHub ¶
guesses the sourcetypes language based on the
path
and optionally filecontent
- ptcx.utils.langs.search_and_insert(text, pattern, insert_func)View on GitHub ¶
finds match & replaces inserts string at first group in pattern.