This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

40 líneas
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. ...