Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rudimentary support for modules property #1

Merged
merged 1 commit into from
Sep 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions kconfiglib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3263,6 +3263,20 @@ def _parse_props(self, node):
else:
self._parse_error("unrecognized option")

elif t0 is _T_MODULES:
# 'modules' formerly was 'option modules'. See above for why
# and when it is ignored. It was changed in
# linux commit 6dd85ff178cd76851e2184b13e545f5a88d1be30.
if node.item is not self.modules:
self._warn("the 'modules' property is not supported. Let "
"me know if this is a problem for you, as it "
"wouldn't be that hard to implement. Note that "
"modules are supported -- Kconfiglib just "
"assumes the symbol name MODULES, like older "
"versions of the C implementation did when "
"'modules' wasn't used.",
self.filename, self.linenr)

elif t0 is _T_OPTIONAL:
if node.item.__class__ is not Choice:
self._parse_error('"optional" is only valid for choices')
Expand Down