aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2017-04-02 08:43:44 +0200
committerSimon Warta <[email protected]>2017-04-02 21:51:55 +0200
commitb3f3e6d718736c5838f6f034d7cf2e0c2bf4ba4d (patch)
treea33d3bb634109ebb121ccbe5d8dd8e26450d18f1
parentd03e0640cd4482ae21e768f0ec07847db06137e6 (diff)
lexed_tokens(): Deduplicate do part in do-while
-rwxr-xr-xconfigure.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.py b/configure.py
index d9a9cce86..22fea5d38 100755
--- a/configure.py
+++ b/configure.py
@@ -543,10 +543,12 @@ def lex_me_harder(infofile, allowed_groups, name_val_pairs):
out.__dict__[key] = val
def lexed_tokens(): # Convert to an interator
- token = lexer.get_token()
- while token != None:
- yield token
+ while True:
token = lexer.get_token()
+ if token != lexer.eof:
+ yield token
+ else:
+ return
for token in lexed_tokens():
match = re.match('<(.*)>', token)