From 98c9a1ec7fce7c84156c079acfd948d96f201698 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 28 Jun 2018 10:11:44 +0200 Subject: [PATCH] Better documentation for _add_token --- parso/parser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parso/parser.py b/parso/parser.py index b56251a..ebf8554 100644 --- a/parso/parser.py +++ b/parso/parser.py @@ -166,7 +166,11 @@ class BaseParser(object): return self.default_leaf(value, start_pos, prefix) def _add_token(self, token): - """Add a token; return True if this is the end of the program.""" + """ + This is the only core function for parsing. Here happens basically + everything. Everything is well prepared by the parser generator and we + only apply the necessary steps here. + """ grammar = self._pgen_grammar stack = self.stack type_, value, start_pos, prefix = token