14 lines
212 B
C
14 lines
212 B
C
enum node_type { literal_node, identifier_node, operation_node };
|
|
|
|
struct node {
|
|
enum node_type type;
|
|
|
|
union {
|
|
char *text;
|
|
struct {
|
|
int operator;
|
|
int arity;
|
|
struct node *operands[];
|
|
} op;
|
|
};
|
|
};
|