-INFIX_OPERATOR_TO_DECLARATION = {
- '+': CInfixOperatorDeclaration(name='add', input_type='INTEGER', result_type='INTEGER', c_operator='+'),
- '-': CInfixOperatorDeclaration(name='subtract', input_type='INTEGER', result_type='INTEGER', c_operator='-'),
- '*': CInfixOperatorDeclaration(name='multiply', input_type='INTEGER', result_type='INTEGER', c_operator='*'),
- '//': CInfixOperatorDeclaration(name='integerDivide', input_type='INTEGER', result_type='INTEGER', c_operator='/'),
- '%': CInfixOperatorDeclaration(name='modularDivide', input_type='INTEGER', result_type='INTEGER', c_operator='%'),
- 'and': CInfixOperatorDeclaration(name='and', input_type='BOOLEAN', result_type='BOOLEAN', c_operator='&&'),
- 'or': CInfixOperatorDeclaration(name='or', input_type='BOOLEAN', result_type='BOOLEAN', c_operator='||'),
-}
+CListAppendStatement = collections.namedtuple(
+ 'CListAppendStatement',
+ (
+ 'list_expression',
+ 'item_expression',
+ ),
+)
+
+def transform_structure_literal_expression(accumulators, expression):
+ return CStructureLiteralExpression(
+ field_count=expression.field_count,
+ symbol_list_variable=expression.symbol_list_variable,
+ value_list_variable=expression.value_list_variable,
+ )
+
+def transform_lambda_expression(accumulators, expression):
+ if expression.name is None:
+ name = '__lambda'
+ else:
+ name = expression.name