27 lines
554 B
C
27 lines
554 B
C
|
|
#include <debug.h>
|
|
|
|
#include "../new.h"
|
|
#include "../inc.h"
|
|
|
|
#include "inheritance.h"
|
|
#include "struct.h"
|
|
#include "new.h"
|
|
|
|
struct expression* new_and_expression(
|
|
int cost,
|
|
struct expression* left,
|
|
struct expression* right)
|
|
{
|
|
struct and_expression* this =
|
|
(void*) new_expression(
|
|
/* inheritance: */ &and_expression_inheritance,
|
|
/* cost: */ cost,
|
|
/* size: */ sizeof(*this));
|
|
|
|
this->left = inc_expression(left);
|
|
this->right = inc_expression(right);
|
|
|
|
return (void*) this;
|
|
}
|
|
|