From 9f342255a2260480701cc2ac2d0c623d4aba1348 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Tue, 3 Jan 2023 00:27:06 -0800 Subject: add some comments; fix some bugs in advance --- src/include/ast.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/include/ast.h') 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); -- cgit