This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

38 righe
729 B

  1. # -*- coding: utf-8 -*-
  2. from typing import List, Dict, Union
  3. from .lark import Lark
  4. from .tree import Tree
  5. from .visitors import Transformer_InPlace
  6. from .lexer import TerminalDef
  7. class WriteTokensTransformer(Transformer_InPlace):
  8. def __init__(self, tokens: Dict[str, TerminalDef], term_subs):
  9. ...
  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, str] = ...):
  21. ...
  22. def reconstruct(self, tree: Tree) -> str:
  23. ...