diff options
Diffstat (limited to 'ast.h')
-rw-r--r-- | ast.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,10 +1,13 @@ #pragma once +#include <stdbool.h> + typedef enum ASTtype{ AST_LIST, AST_WORD, AST_NUMBER, + AST_STRING, AST_SYMBOL, } ASTtype; @@ -14,6 +17,7 @@ typedef struct AST AST; typedef struct ASTlist{ int len; AST **nodes; + bool quoted; } ASTlist; typedef struct ASTword{ @@ -24,6 +28,11 @@ typedef struct ASTnumber{ double num; } ASTnumber; +typedef struct ASTstring{ + char *str; + int len; +} ASTstring; + typedef struct ASTsymbol{ char *name; int symid; @@ -38,6 +47,7 @@ struct AST{ ASTlist l; ASTword w; ASTnumber n; + ASTstring S; ASTsymbol s; }; }; |