diff options
| author | Tom Harley | 2019-12-23 01:32:39 +0000 |
|---|---|---|
| committer | Tom Harley | 2019-12-23 01:32:39 +0000 |
| commit | 7bc67b95161a34f8eca635d4000d9602508a9243 (patch) | |
| tree | 585b3778dc1967832390e5829e4b3909b4184a2c /sexpr.h | |
| parent | Add basics for interpreter; add CLI options (diff) | |
| download | sinter-7bc67b95161a34f8eca635d4000d9602508a9243.tar.gz sinter-7bc67b95161a34f8eca635d4000d9602508a9243.zip | |
checkpoint
Diffstat (limited to 'sexpr.h')
| -rw-r--r-- | sexpr.h | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -0,0 +1,29 @@ +#ifndef SEXPR_H +#define SEXPR_H + +typedef struct YYLTYPE { + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +typedef YYLTYPE lloc_t; + +#define YYLTYPE_IS_DECLARED 1 +#define YYLTYPE_IS_TRIVIAL 1 + +typedef struct sexpr { + int type; + union contents { + double f; + char *s; + int i; + struct node { + struct sexpr *l; + struct sexpr *r; + } n; + } contents; + lloc_t lloc; +} sexpr; + +#endif /* SEXPR_H */ |
