aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-03-02 00:41:50 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit2a17f5225a09c01eb04225d0241c686ea553f912 (patch)
tree68e37b124895697fe766a30487fc6f4403e862d7 /src
parent9d2e9708110130aa764de5359962f6ee53a52515 (diff)
Cleanup.. im stupid
Diffstat (limited to 'src')
-rw-r--r--src/tokenizer.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/tokenizer.c b/src/tokenizer.c
index e03b441..fdb06cd 100644
--- a/src/tokenizer.c
+++ b/src/tokenizer.c
@@ -217,13 +217,8 @@ int tokenizer_consume_if(Tokenizer *self, Token expected_token, bool *result) {
}
return_if_error(tokenizer_next(self, &actual_token));
- if(actual_token == expected_token) {
- self->needs_update = bool_true;
- *result = bool_true;
- } else {
- self->needs_update = bool_false;
- *result = bool_false;
- }
+ *result = (actual_token == expected_token);
+ self->needs_update = *result;
return TOKENIZER_OK;
}