diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-02-25 15:12:09 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-02-25 15:20:15 +0100 |
| commit | 17026039bd81da7305b35c3d13b8d9cf45924a50 (patch) | |
| tree | 0c9a46bc703e04803652cf695f8109ab302f1dbb | |
| parent | befb4129f09fa5c1a6e29dbeeb26feeaf6669eda (diff) | |
Clarify the purpose of _STRING_LEX
The main purpose of _STRING_LEX is being able to tell strings from
constant symbol references during tokenization. The old comment was
implying that its only purpose is handling the "missing quotes" in e.g.
source foo/Kconfig
Update the comment to make _STRING_LEX clearer.
| -rw-r--r-- | kconfiglib.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index a05a079..fda12c6 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -4497,8 +4497,13 @@ _get_keyword = { "visible": _T_VISIBLE, }.get -# Tokens after which identifier-like lexemes are treated as strings. _T_CHOICE -# is included to avoid symbols being registered for named choices. +# Tokens after which strings are expected. This is used to tell strings from +# constant symbol references during tokenization, both of which are enclosed in +# quotes. +# +# Identifier-like lexemes ("missing quotes") are also treated as strings after +# these tokens. _T_CHOICE is included to avoid symbols being registered for +# named choices. _STRING_LEX = frozenset(( _T_BOOL, _T_CHOICE, |
