Browse Source

Replace '...' with 'NotImplemented'

gm/2021-09-23T00Z/github.com--lark-parser-lark/1.0b
Erez Sh 3 years ago
parent
commit
0fddb7fef6
2 changed files with 7 additions and 7 deletions
  1. +6
    -6
      lark/indenter.py
  2. +1
    -1
      lark/lexer.py

+ 6
- 6
lark/indenter.py View File

@@ -74,31 +74,31 @@ class Indenter(PostLex, ABC):
@property @property
@abstractmethod @abstractmethod
def NL_type(self) -> str: def NL_type(self) -> str:
...
return NotImplemented


@property @property
@abstractmethod @abstractmethod
def OPEN_PAREN_types(self) -> List[str]: def OPEN_PAREN_types(self) -> List[str]:
...
return NotImplemented


@property @property
@abstractmethod @abstractmethod
def CLOSE_PAREN_types(self) -> List[str]: def CLOSE_PAREN_types(self) -> List[str]:
...
return NotImplemented


@property @property
@abstractmethod @abstractmethod
def INDENT_type(self) -> str: def INDENT_type(self) -> str:
...
return NotImplemented


@property @property
@abstractmethod @abstractmethod
def DEDENT_type(self) -> str: def DEDENT_type(self) -> str:
...
return NotImplemented


@property @property
@abstractmethod @abstractmethod
def tab_len(self) -> int: def tab_len(self) -> int:
...
return NotImplemented


###} ###}

+ 1
- 1
lark/lexer.py View File

@@ -359,7 +359,7 @@ class Lexer(ABC):
""" """
@abstractmethod @abstractmethod
def lex(self, lexer_state: LexerState, parser_state: Any) -> Iterator[Token]: def lex(self, lexer_state: LexerState, parser_state: Any) -> Iterator[Token]:
...
return NotImplemented


def make_lexer_state(self, text): def make_lexer_state(self, text):
line_ctr = LineCounter(b'\n' if isinstance(text, bytes) else '\n') line_ctr = LineCounter(b'\n' if isinstance(text, bytes) else '\n')


Loading…
Cancel
Save