From 62ff4eed7e32969b68a381aedf6ad2c9169c7e00 Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Wed, 24 Jul 2019 13:20:35 -0400 Subject: [PATCH] Remove unnecessary pushing/popping for integer literal expressions --- normalization.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/normalization.py b/normalization.py index 5eef1db..71f1fba 100644 --- a/normalization.py +++ b/normalization.py @@ -120,16 +120,10 @@ NormalProgram = collections.namedtuple( ) def normalize_integer_literal_expression(counter, expression): - variable = '${}'.format(counter) return ( - counter + 1, - ( - NormalVariableInitializationStatement( - variable=variable, - expression=NormalIntegerLiteralExpression(integer=expression.integer), - ), - ), - NormalVariableExpression(variable=variable), + counter, + (), + NormalIntegerLiteralExpression(integer=expression.integer), ) def normalize_lambda_expression(counter, expression): -- 2.20.1