| @@ -1,5 +1,5 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| from types import ModuleType | |||||
| from typing import ( | from typing import ( | ||||
| TypeVar, Type, Tuple, List, Dict, Iterator, Collection, Callable, Optional, | TypeVar, Type, Tuple, List, Dict, Iterator, Collection, Callable, Optional, | ||||
| Pattern as REPattern, | Pattern as REPattern, | ||||
| @@ -111,6 +111,7 @@ class TraditionalLexer(Lexer): | |||||
| def __init__( | def __init__( | ||||
| self, | self, | ||||
| terminals: Collection[TerminalDef], | terminals: Collection[TerminalDef], | ||||
| re_: ModuleType, | |||||
| ignore: Collection[str] = ..., | ignore: Collection[str] = ..., | ||||
| user_callbacks: Dict[str, _Callback] = ..., | user_callbacks: Dict[str, _Callback] = ..., | ||||
| g_regex_flags: int = ... | g_regex_flags: int = ... | ||||
| @@ -135,6 +136,7 @@ class ContextualLexer(Lexer): | |||||
| self, | self, | ||||
| terminals: Collection[TerminalDef], | terminals: Collection[TerminalDef], | ||||
| states: Dict[str, Collection[str]], | states: Dict[str, Collection[str]], | ||||
| re_: ModuleType, | |||||
| ignore: Collection[str] = ..., | ignore: Collection[str] = ..., | ||||
| always_accept: Collection[str] = ..., | always_accept: Collection[str] = ..., | ||||
| user_callbacks: Dict[str, _Callback] = ..., | user_callbacks: Dict[str, _Callback] = ..., | ||||