Some work

This commit is contained in:
2026-04-09 23:27:34 -07:00
parent 0671e17e8e
commit 52e421d0c9
7 changed files with 218 additions and 7 deletions

17
lc.h
View File

@@ -1,6 +1,8 @@
#ifndef INCLUDED_TERM_H
#define INCLUDED_TERM_H
#include "token.h"
#include <stddef.h>
typedef enum {
@@ -14,17 +16,22 @@ struct _LambdaTerm {
LambdaTermType type;
union {
struct {
char name;
char *name;
size_t name_len;
} v;
struct {
char argument;
char *arg;
size_t arg_len;
LambdaTerm *body;
} l;
struct {
char function;
LambdaTerm *argument;
};
LambdaTerm *func;
LambdaTerm *arg;
} a;
};
};
LambdaTerm *read_lambda_term(TokenStream *restrict stream,
ParseError *restrict err_out);
#endif