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.

54 rindas
996 B

  1. # -*- coding: utf-8 -*-
  2. from typing import Tuple, List, Iterator, Optional
  3. from abc import ABC, abstractmethod
  4. from .lexer import Token
  5. class Indenter(ABC):
  6. paren_level: Optional[int]
  7. indent_level: Optional[List[int]]
  8. def __init__(self) -> None:
  9. ...
  10. def handle_NL(self, token: Token) -> Iterator[Token]:
  11. ...
  12. def process(self, stream: Iterator[Token]) -> Iterator[Token]:
  13. ...
  14. @property
  15. def always_accept(self) -> Tuple[str]:
  16. ...
  17. @property
  18. @abstractmethod
  19. def NL_type(self) -> str:
  20. ...
  21. @property
  22. @abstractmethod
  23. def OPEN_PAREN_types(self) -> List[str]:
  24. ...
  25. @property
  26. @abstractmethod
  27. def CLOSE_PAREN_types(self) -> List[str]:
  28. ...
  29. @property
  30. @abstractmethod
  31. def INDENT_type(self) -> str:
  32. ...
  33. @property
  34. @abstractmethod
  35. def DEDENT_type(self) -> str:
  36. ...
  37. @property
  38. @abstractmethod
  39. def tab_len(self) -> int:
  40. ...