From 17026039bd81da7305b35c3d13b8d9cf45924a50 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sun, 25 Feb 2018 15:12:09 +0100 Subject: 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. --- kconfiglib.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'kconfiglib.py') 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, -- cgit v1.2.3