Skip to content

Commit b7ef946

Browse files
committed
Skip transitional keyword
This allows to parse configs with the transitional key word. For a working version of the transitional feature it is necessary to extend parsing of the default keyword to support setting the value to a variable: ``` config NEW_BOOL bool "New bool option" default OLD_BOOL ``` Signed-off-by: Quirin Gylstorff <[email protected]>
1 parent 4969567 commit b7ef946

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

kconfiglib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3151,6 +3151,8 @@ def _parse_props(self, node):
31513151
node.dep = self._make_and(node.dep,
31523152
self._expect_expr_and_eol())
31533153

3154+
elif t0 is _T_TRANSITIONAL:
3155+
continue
31543156
elif t0 is _T_HELP:
31553157
self._parse_help(node)
31563158

@@ -7010,9 +7012,10 @@ def _shell_fn(kconf, _, command):
70107012
_T_SOURCE,
70117013
_T_STRING,
70127014
_T_TRISTATE,
7015+
_T_TRANSITIONAL,
70137016
_T_UNEQUAL,
70147017
_T_VISIBLE,
7015-
) = range(1, 51)
7018+
) = range(1, 52)
70167019

70177020
# Keyword to token map, with the get() method assigned directly as a small
70187021
# optimization
@@ -7059,6 +7062,7 @@ def _shell_fn(kconf, _, command):
70597062
"source": _T_SOURCE,
70607063
"string": _T_STRING,
70617064
"tristate": _T_TRISTATE,
7065+
"transitional": _T_TRANSITIONAL,
70627066
"visible": _T_VISIBLE,
70637067
}.get
70647068

0 commit comments

Comments
 (0)