This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

40 řádky
937 B

  1. # -*- coding: utf-8 -*-
  2. from typing import List, Dict, Union, Callable, Iterable
  3. from .grammar import Symbol
  4. from .lark import Lark
  5. from .tree import Tree
  6. from .visitors import Transformer_InPlace
  7. from .lexer import TerminalDef
  8. class WriteTokensTransformer(Transformer_InPlace):
  9. def __init__(self, tokens: Dict[str, TerminalDef], term_subs: Dict[str, Callable[[Symbol], str]] = ...): ...
  10. class MatchTree(Tree):
  11. pass
  12. class MakeMatchTree:
  13. name: str
  14. expansion: List[TerminalDef]
  15. def __init__(self, name: str, expansion: List[TerminalDef]):
  16. ...
  17. def __call__(self, args: List[Union[str, Tree]]):
  18. ...
  19. class Reconstructor:
  20. def __init__(self, parser: Lark, term_subs: Dict[str, Callable[[Symbol], str]] = ...):
  21. ...
  22. def reconstruct(self, tree: Tree, postproc: Callable[[Iterable[str]], Iterable[str]]=None,
  23. insert_spaces: bool = True) -> str:
  24. ...