summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2019-05-10 14:13:08 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2019-05-10 14:14:16 +0200
commit0f2b78c71e9fc2c9c1890e91dc37c1a853602847 (patch)
tree5c320aa35488597e7aa8b87e840f4c6aa9fff91d
parentcc6fbd75f418b3f0bc49759a75ded5f91c8f0718 (diff)
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.
-rw-r--r--kconfiglib.py2
1 files changed, 0 insertions, 2 deletions
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'