diff options
| author | Mistivia <i@mistivia.com> | 2025-06-18 20:55:54 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-06-18 20:55:54 +0800 |
| commit | 0b335dc24e76cace44e748e62d5cbbc40c4355f5 (patch) | |
| tree | 5fa2ef69b88908a8ddb6c78624919d967fcba875 /src/sexp.h | |
| parent | 6f1cfbda4a519ad8a232d126539a2732ab43c671 (diff) | |
finish parser
Diffstat (limited to 'src/sexp.h')
| -rw-r--r-- | src/sexp.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -21,6 +21,7 @@ typedef struct { typedef struct { SExpRef args; SExpRef body; + SExpRef env; } SExpFunc; typedef struct { @@ -30,7 +31,6 @@ typedef struct { typedef struct { SExpRef parent; - SExpRef child; SExpRef bindings; } SExpEnv; @@ -42,10 +42,11 @@ typedef struct { } SExpBinding; typedef enum { + kEmptySExp, kIntegerSExp, kRealSExp, kBooleanSExp, - kNumberSExp, + kNilSExp, kCharSExp, kStringSExp, kSymbolSExp, @@ -58,6 +59,7 @@ typedef enum { } SExpType; struct sexp { + bool marked; SExpType type; union { int64_t integer; @@ -73,8 +75,10 @@ struct sexp { }; void SExp_show(SExp self, FILE* fp); +void SExpRef_show(SExpRef self, FILE* fp); VECTOR_DEF(SExp); +VECTOR_DEF(SExpRef); #endif |
