massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / lib2to3 / pgen2 / parse.pyi
1 from lib2to3.pgen2.grammar import _DFAS, Grammar
2 from lib2to3.pytree import _NL, _Convert, _RawNode
3 from typing import Any, Sequence
4
5 _Context = Sequence[Any]
6
7 class ParseError(Exception):
8     msg: str
9     type: int
10     value: str | None
11     context: _Context
12     def __init__(self, msg: str, type: int, value: str | None, context: _Context) -> None: ...
13
14 class Parser:
15     grammar: Grammar
16     convert: _Convert
17     stack: list[tuple[_DFAS, int, _RawNode]]
18     rootnode: _NL | None
19     used_names: set[str]
20     def __init__(self, grammar: Grammar, convert: _Convert | None = ...) -> None: ...
21     def setup(self, start: int | None = ...) -> None: ...
22     def addtoken(self, type: int, value: str | None, context: _Context) -> bool: ...
23     def classify(self, type: int, value: str | None, context: _Context) -> int: ...
24     def shift(self, type: int, value: str | None, newstate: int, context: _Context) -> None: ...
25     def push(self, type: int, newdfa: _DFAS, newstate: int, context: _Context) -> None: ...
26     def pop(self) -> None: ...