X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/ee7151e50f812a368faff0be910e6db26e282680..154b98579d3904a042fd3e02a9d77a76be63b36c:/blib2to3/pgen2/grammar.py?ds=inline diff --git a/blib2to3/pgen2/grammar.py b/blib2to3/pgen2/grammar.py index 3ccf38f..aa025cf 100644 --- a/blib2to3/pgen2/grammar.py +++ b/blib2to3/pgen2/grammar.py @@ -85,6 +85,8 @@ class Grammar(object): self.tokens = {} self.symbol2label = {} self.start = 256 + # Python 3.7+ parses async as a keyword, not an identifier + self.async_keywords = False def dump(self, filename): """Dump the grammar tables to a pickle file.""" @@ -113,6 +115,7 @@ class Grammar(object): new.labels = self.labels[:] new.states = self.states[:] new.start = self.start + new.async_keywords = self.async_keywords return new def report(self): @@ -181,6 +184,7 @@ opmap_raw = """ // DOUBLESLASH //= DOUBLESLASHEQUAL -> RARROW +:= COLONEQUAL """ opmap = {}