from collections.abc import Iterator
from typing import Any

class Tok:
    num: int = ...
    id: int = ...
    name: str = ...
    regex: str = ...
    next: str | None = ...
    def __init__(self, name: str, regex: str, next: str | None = ...) -> None: ...

def literals(choices: str, prefix: str = ..., suffix: str = ...) -> str: ...

class Lexer:
    regexes: Any = ...
    toks: Any = ...
    state: Any = ...
    def __init__(self, states: dict[str, list[Tok]], first: str) -> None: ...
    def lex(self, text: str) -> Iterator[tuple[str, str]]: ...

class JsLexer(Lexer):
    both_before: Any = ...
    both_after: Any = ...
    states: Any = ...
    def __init__(self) -> None: ...

def prepare_js_for_gettext(js: str) -> str: ...
