From 07f43b4b7ef27065492a14097de6bd55bf0f636e Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 16 Jan 2018 16:02:10 +0100 Subject: Fix lying implementation comments Implicit submenus are created after parsing, in _finalize_tree(), so the parent can never be a symbol in _parse_block(). --- kconfiglib.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/kconfiglib.py b/kconfiglib.py index f92c955..f2236e2 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -552,9 +552,9 @@ class Kconfig(object): if self.config_prefix is None: self.config_prefix = "CONFIG_" - # Regular expressions for parsing .config files, with the get() method - # assigned directly as a small optimization (microscopic in this case, - # but it's consistent with the other regexes) + # Regular expressions for parsing .config files, with the match() + # method assigned directly as a small optimization (microscopic in this + # case, but it's consistent with the other regexes) self._set_re_match = re.compile(r"{}(\w+)=(.*)" .format(self.config_prefix)).match self._unset_re_match = re.compile(r"# {}(\w+) is not set" @@ -1481,9 +1481,8 @@ class Kconfig(object): for files. parent: - The parent menu node, corresponding to e.g. a menu or Choice. Can - also be a Symbol, due to automatic submenu creation from - dependencies. + The parent menu node, corresponding to menu, Choice, or 'if'. 'if's + are flattened after parsing. visible_if_deps: 'visible if' dependencies from enclosing menus. Propagated to Symbol -- cgit v1.2.3