Initial commit
This commit is contained in:
30
term.h
Normal file
30
term.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user