This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.4 KiB

  1. # -*- coding: utf-8 -*-
  2. from typing import List, Callable, Iterator, Union, Optional, Literal
  3. from .lexer import TerminalDef
  4. class Meta:
  5. empty: bool
  6. line: int
  7. column: int
  8. start_pos: int
  9. end_line: int
  10. end_column: int
  11. end_pos: int
  12. orig_expansion: List[TerminalDef]
  13. match_tree: bool
  14. class Tree:
  15. data: str
  16. children: List[Union[str, Tree]]
  17. meta: Meta
  18. def __init__(
  19. self,
  20. data: str,
  21. children: List[Union[str, Tree]],
  22. meta: Optional[Meta] = None
  23. ):
  24. ...
  25. def pretty(self, indent_str: str = ...) -> str:
  26. ...
  27. def find_pred(self, pred: Callable[[Tree], bool]) -> Iterator[Tree]:
  28. ...
  29. def find_data(self, data: str) -> Iterator[Tree]:
  30. ...
  31. def expand_kids_by_index(self, *indices: int) -> None:
  32. ...
  33. def scan_values(self, pred: Callable[[Union[str, Tree]], bool]):
  34. ...
  35. def iter_subtrees(self) -> Iterator[Tree]:
  36. ...
  37. def iter_subtrees_topdown(self) -> Iterator[Tree]:
  38. ...
  39. def copy(self) -> Tree:
  40. ...
  41. def set(self, data: str, children: List[Union[str, Tree]]) -> None:
  42. ...
  43. def __hash__(self) -> int:
  44. ...
  45. class SlottedTree(Tree):
  46. pass
  47. def pydot__tree_to_png(
  48. tree: Tree,
  49. filename: str,
  50. rankdir: Literal["TB", "LR", "BT", "RL"] = ...,
  51. **kwargs
  52. ) -> None:
  53. ...