From: David Kerkeslager Date: Wed, 28 Aug 2019 15:54:01 +0000 (-0400) Subject: Simplify list construction X-Git-Url: https://code.kerkeslager.com/?a=commitdiff_plain;h=a9ab9dd833ed081abbed647aa16eeaa2f61b85d7;p=fur Simplify list construction --- diff --git a/normalization.py b/normalization.py index 76c5395..309e84c 100644 --- a/normalization.py +++ b/normalization.py @@ -162,8 +162,6 @@ def normalize_list_literal_expression(counter, expression): prestatements = [] - list_expression = NormalVariableExpression(variable=list_variable) - for item_expression in expression.item_expression_list: counter, item_expression_prestatements, normalized = normalize_expression( counter, @@ -179,15 +177,10 @@ def normalize_list_literal_expression(counter, expression): ) ) - prestatements.append(NormalVariableInitializationStatement( - variable=list_variable, - expression=NormalListConstructExpression(allocate=len(expression.item_expression_list)), - )) - return ( counter, tuple(prestatements), - list_expression, + NormalListConstructExpression(allocate=len(expression.item_expression_list)), ) def normalize_string_literal_expression(counter, expression):