From 20e114e33d80f4b2250bfe1dae325ee79862fede Mon Sep 17 00:00:00 2001 From: Garritt McCune Date: Tue, 14 Apr 2020 11:26:38 -0500 Subject: [PATCH] Fixed a bug in the tokenizer's 'replace_variables' method that would cause the new token list to hold references to objects in the provided token list. --- tokenizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokenizer.py b/tokenizer.py index 17030c2..7d4717c 100644 --- a/tokenizer.py +++ b/tokenizer.py @@ -79,6 +79,6 @@ def replace_variables(tokens, new_constants): if t.type == token.TokenType.variable: newTokenList.append(token.CToken(new_constants.pop(0), token.TokenType.constant)) else: - newTokenList.append(t) + newTokenList.append(token.CToken(t.value, t.type)) return newTokenList