How to use the tatsu.infos.TreeInfo function in TatSu

To help you get started, we’ve selected a few TatSu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neogeny / TatSu / tatsu / contexts.py View on Github external
def _push_ast(self):
        self._tree_stack.append(TreeInfo())
github neogeny / TatSu / tatsu / contexts.py View on Github external
def _initialize_caches(self):
        self._tree_stack = [TreeInfo()]
        self._rule_stack = []
        self._cut_stack = [False]

        self._last_node = None
        self._state = None
        self._lookahead = 0

        self._clear_memoization_caches()
github neogeny / TatSu / tatsu / contexts.py View on Github external
def _push_cst(self):
        self._tree_stack.append(TreeInfo(ast=self.ast))