diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-08-18 22:05:21 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-08-18 22:05:21 +0200 |
commit | 15fb03902ff5550b3a8c44bde3e08df876449f7a (patch) | |
tree | 3038093b4bc1fff20e3f713d2ed8c3e9f2a1cec8 /ast.h | |
parent | 2c30522aa65126ebacfd52f7b38a2e24682d7065 (diff) |
Third
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; }; }; |