summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-08-18 22:05:21 +0200
committertomsmeding <tom.smeding@gmail.com>2016-08-18 22:05:21 +0200
commit15fb03902ff5550b3a8c44bde3e08df876449f7a (patch)
tree3038093b4bc1fff20e3f713d2ed8c3e9f2a1cec8 /ast.h
parent2c30522aa65126ebacfd52f7b38a2e24682d7065 (diff)
Third
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ast.h b/ast.h
index 46c4b49..f55d798 100644
--- a/ast.h
+++ b/ast.h
@@ -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;
};
};