diff options
author | Simon Warta <[email protected]> | 2017-04-02 08:43:44 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2017-04-02 21:51:55 +0200 |
commit | b3f3e6d718736c5838f6f034d7cf2e0c2bf4ba4d (patch) | |
tree | a33d3bb634109ebb121ccbe5d8dd8e26450d18f1 /configure.py | |
parent | d03e0640cd4482ae21e768f0ec07847db06137e6 (diff) |
lexed_tokens(): Deduplicate do part in do-while
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 8 |
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) |