WONKY



LOG | FILES | OVERVIEW


F diff --git a/src/semantics/.ast.c.swp b/src/semantics/.ast.c.swp deleted file mode 100644
B Binary files a/src/semantics/.ast.c.swp and /dev/null differ
F diff --git a/src/semantics/ast.c b/src/semantics/ast.c --- a/src/semantics/ast.c +++ b/src/semantics/ast.c
struct AST_Binary_Expression* get_modulo_tree(struct AST_Expression *left,struct AST_Expression *right,struct Translation_Data *translation_data)
{
- struct Type *hold_type;
- hold_type=extract_expresion_value_type(left,translation_data);
- if(!type_is_integer_type(hold_type))
- { push_translation_error("expected integer type in modulo operation",translation_data); return get_error_tree(get_binary_expression_tree(left,right,OP_REMAINDER)); }
-
- hold_type=extract_expresion_value_type(right,translation_data);
- if(!type_is_integer_type(hold_type))
- { push_translation_error("expected integer type in modulo operation",translation_data); return get_error_tree(get_binary_expression_tree(left,right,OP_REMAINDER)); }
return get_binary_expression_after_conversion(left,right,OP_REMAINDER,translation_data);
}
F diff --git a/src/semantics/value/.constraints.hh.swp b/src/semantics/value/.constraints.hh.swp deleted file mode 100644
B Binary files a/src/semantics/value/.constraints.hh.swp and /dev/null differ
F diff --git a/src/semantics/value/constraints.hh b/src/semantics/value/constraints.hh --- a/src/semantics/value/constraints.hh +++ b/src/semantics/value/constraints.hh
char constraint_check_modulo_expression(struct AST_Expression *left,struct AST_Expression *right,struct Translation_Data *translation_data)
{
-
+ struct Type *hold_type;
+ hold_type=extract_expresion_value_type(left,translation_data);
+ if(!type_is_integer_type(hold_type))
+ { push_translation_error("expected integer type in modulo operation",translation_data); return get_error_tree(get_binary_expression_tree(left,right,OP_REMAINDER)); }
+
+ hold_type=extract_expresion_value_type(right,translation_data);
+ if(!type_is_integer_type(hold_type))
+ { push_translation_error("expected integer type in modulo operation",translation_data); return get_error_tree(get_binary_expression_tree(left,right,OP_REMAINDER)); }
}
char constraint_check_multiplicative_expression(struct AST_Expression *left,struct AST_Expression *right,enum AST_Type operation,struct Translation_Data *translation_data)
{