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.
This commit is contained in:
+1
-1
@@ -79,6 +79,6 @@ def replace_variables(tokens, new_constants):
|
|||||||
if t.type == token.TokenType.variable:
|
if t.type == token.TokenType.variable:
|
||||||
newTokenList.append(token.CToken(new_constants.pop(0), token.TokenType.constant))
|
newTokenList.append(token.CToken(new_constants.pop(0), token.TokenType.constant))
|
||||||
else:
|
else:
|
||||||
newTokenList.append(t)
|
newTokenList.append(token.CToken(t.value, t.type))
|
||||||
|
|
||||||
return newTokenList
|
return newTokenList
|
||||||
|
|||||||
Reference in New Issue
Block a user