X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/022f89625f9bb33ab55c82c45ec0eb8512623fd3..6c88e8e46e19aa9f1986ab9d1f0ee4cf95f49956:/src/blib2to3/pygram.py diff --git a/src/blib2to3/pygram.py b/src/blib2to3/pygram.py index a3df9be..c30c630 100644 --- a/src/blib2to3/pygram.py +++ b/src/blib2to3/pygram.py @@ -5,13 +5,10 @@ # Python imports import os - from typing import Union # Local imports -from .pgen2 import token from .pgen2 import driver - from .pgen2.grammar import Grammar # Moved into initialize because mypyc can't handle __file__ (XXX bug) @@ -21,7 +18,7 @@ from .pgen2.grammar import Grammar # "PatternGrammar.txt") -class Symbols(object): +class Symbols: def __init__(self, grammar: Grammar) -> None: """Initializer. @@ -95,6 +92,7 @@ class _python_symbols(Symbols): old_test: int or_test: int parameters: int + paramspec: int pass_stmt: int pattern: int patterns: int @@ -123,9 +121,15 @@ class _python_symbols(Symbols): tfpdef: int tfplist: int tname: int + tname_star: int trailer: int try_stmt: int + type_stmt: int typedargslist: int + typeparam: int + typeparams: int + typevar: int + typevartuple: int varargslist: int vfpdef: int vfplist: int