summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
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;
};
};