lark/lark-stubs/reconstruct.pyi

38 lines
696 B
Python
Raw Normal View History

2020-02-13 14:34:05 +00:00
# -*- coding: utf-8 -*-
2020-02-16 06:09:53 +00:00
from typing import List, Dict, Union
2020-02-13 14:34:05 +00:00
from .lark import Lark
from .tree import Tree
2020-02-16 06:09:53 +00:00
from .visitors import Transformer_InPlace
from .lexer import TerminalDef
class WriteTokensTransformer(Transformer_InPlace):
def __init__(self, tokens: Dict[str, TerminalDef], term_subs):
...
class MatchTree(Tree):
pass
class MakeMatchTree:
name: str
expansion: List[TerminalDef]
def __init__(self, name: str, expansion: List[TerminalDef]):
...
def __call__(self, args: List[Union[str, Tree]]):
...
2020-02-13 14:34:05 +00:00
class Reconstructor:
def __init__(self, parser: Lark):
...
def reconstruct(self, tree: Tree) -> str:
...