4-variable-simplifier/expression/or/new.c
2026-04-25 16:00:10 -04:00

27 lines
551 B
C

#include <debug.h>
#include "../new.h"
#include "../inc.h"
#include "inheritance.h"
#include "struct.h"
#include "new.h"
struct expression* new_or_expression(
int cost,
struct expression* left,
struct expression* right)
{
struct or_expression* this =
(void*) new_expression(
/* inheritance: */ &or_expression_inheritance,
/* cost: */ cost,
/* size: */ sizeof(*this));
this->left = inc_expression(left);
this->right = inc_expression(right);
return (void*) this;
}