31 lines
500 B
C
31 lines
500 B
C
#ifndef INCLUDED_TERM_H
|
|
#define INCLUDED_TERM_H
|
|
|
|
#include <stddef.h>
|
|
|
|
typedef enum {
|
|
TYPE_VARIABLE,
|
|
TYPE_LAMBDA,
|
|
TYPE_APPLY,
|
|
} LambdaTermType;
|
|
|
|
typedef struct _LambdaTerm LambdaTerm;
|
|
struct _LambdaTerm {
|
|
LambdaTermType type;
|
|
union {
|
|
struct {
|
|
char name;
|
|
} v;
|
|
struct {
|
|
char argument;
|
|
LambdaTerm *body;
|
|
} l;
|
|
struct {
|
|
char function;
|
|
LambdaTerm *argument;
|
|
};
|
|
};
|
|
};
|
|
|
|
#endif
|