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.
 
 

48 líneas
881 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. from .lark import PostLex
  6. class Indenter(PostLex, ABC):
  7. paren_level: Optional[int]
  8. indent_level: Optional[List[int]]
  9. def __init__(self) -> None:
  10. ...
  11. def handle_NL(self, token: Token) -> Iterator[Token]:
  12. ...
  13. @property
  14. @abstractmethod
  15. def NL_type(self) -> str:
  16. ...
  17. @property
  18. @abstractmethod
  19. def OPEN_PAREN_types(self) -> List[str]:
  20. ...
  21. @property
  22. @abstractmethod
  23. def CLOSE_PAREN_types(self) -> List[str]:
  24. ...
  25. @property
  26. @abstractmethod
  27. def INDENT_type(self) -> str:
  28. ...
  29. @property
  30. @abstractmethod
  31. def DEDENT_type(self) -> str:
  32. ...
  33. @property
  34. @abstractmethod
  35. def tab_len(self) -> int:
  36. ...