From 0f2b78c71e9fc2c9c1890e91dc37c1a853602847 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 10 May 2019 14:13:08 +0200 Subject: Do not set top_node location to location of 'mainmenu' statement It's undocumented and unguessable that Kconfig.top_node.filename/linenr gets set to the location of the 'mainmenu' statement (if any). Always set it to the first line of the top-level Kconfig instead, which should be more expected. --- kconfiglib.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index 43a9959..bfcefec 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2757,8 +2757,6 @@ class Kconfig(object): elif t0 is _T_MAINMENU: self.top_node.prompt = (self._expect_str_and_eol(), self.y) - self.top_node.filename = self._filename - self.top_node.linenr = self._linenr else: # A valid endchoice/endif/endmenu is caught by the 'end_token' -- cgit v1.2.3