This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

40 rindas
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. ...