diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-11-23 01:33:32 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-11-23 10:29:57 +0100 |
| commit | ab89ef6aa7b8fef0eb410949c86a25e55586a972 (patch) | |
| tree | 29839f84eb3a109a74ef9d8480e4a41683b0f487 /testsuite.py | |
| parent | 01757e5ac9324948ca64a4cf512352b09956a8fa (diff) | |
Get rid of _next_token() and _peek_token()
These are pretty hot. Inline them to save a few % of parsing time.
They're pretty simple anyway.
_tokens_i was initialized to -1 to simplify the _next_token()
implementation. With _next_token() gone, initialize it to 0 instead,
which simplifies some other code.
Diffstat (limited to 'testsuite.py')
| -rw-r--r-- | testsuite.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite.py b/testsuite.py index 22e12cc..336fa65 100644 --- a/testsuite.py +++ b/testsuite.py @@ -1260,7 +1260,7 @@ tests/Krecursive2:1 def verify_split(to_split, op, operand_strs): # The same hackage as in Kconfig.eval_string() c._tokens = c._tokenize("if " + to_split)[1:] - c._tokens_i = -1 + c._tokens_i = 0 operands = split_expr(c._parse_expr(False), op) |
