diff options
author | Preston Pan <preston@nullring.xyz> | 2023-01-03 00:27:06 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2023-01-03 00:27:06 -0800 |
commit | 9f342255a2260480701cc2ac2d0c623d4aba1348 (patch) | |
tree | 6ecd1332032eb09fd28aacab7418da9a5882cb94 /src/include/ast.h | |
parent | 64feef1b9ea72adf7ba32998e9dca7d507607498 (diff) |
add some comments; fix some bugs in advance
Diffstat (limited to 'src/include/ast.h')
-rw-r--r-- | src/include/ast.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/ast.h b/src/include/ast.h index f7be3d5..ca07c9d 100644 --- a/src/include/ast.h +++ b/src/include/ast.h @@ -17,15 +17,19 @@ typedef struct AST_STRUCT { /* For functions, the car will be a list of variables, and the cdr will be the * expression */ + int argument_number; /* number of arguments that function accepts. Used for + speeding up stuff. */ struct AST_STRUCT *car; struct AST_STRUCT *cdr; - char *string_value; + char *string_value; /* Also is symbol value */ int int_value; double float_value; bool bool_value; } ast_t; +ast_t *init_ast(int type); + ast_t *init_ast_string(char *value); ast_t *init_ast_int(int value); |