summaryrefslogtreecommitdiff
path: root/src/core/token.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/token.h')
-rw-r--r--src/core/token.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/core/token.h b/src/core/token.h
index e683e01..caf4854 100644
--- a/src/core/token.h
+++ b/src/core/token.h
@@ -53,10 +53,6 @@
#define IS_ASSIGNABLE(t) (START_ASSIGNABLES < t && t < END_ASSIGNABLES)
#define IS_NUMERICAL(t) (START_NUMERICAL < t && t < END_NUMERICAL)
#define IS_NOT_NUMERICAL(t) !(IS_NUMERICAL(t))
-#define IS_ARRAY(t) (t->tt_cur == TT_ARRAY)
-#define IS_NOT_ARRAY(t) !(IS_ARRAY(t))
-#define IS_SOURCE_TOKEN(t) (t->b_source_token == true)
-#define IS_NOT_SOURCE_TOKEN(t) (t->b_source_token == false)
#define token_get_filename(t) \
(t->c_filename != NULL ? t->c_filename : "Code string")
@@ -74,6 +70,7 @@
#define token_get_posnr(t) t->i_pos_nr
#define token_get_linenr(t) t->i_line_nr
#define token_ref_up(t) ++t->i_ref_count
+#define token_ref_down(t) --t->i_ref_count
typedef enum {
// Diverse
@@ -89,8 +86,8 @@ typedef enum {
TT_INTEGER,
TT_DOUBLE,
END_NUMERICAL,
- TT_ARRAY,
TT_STRING,
+ TT_ARRAY,
END_ASSIGNABLES,
TT_IDENT,
END_TYPES,
@@ -106,6 +103,7 @@ typedef enum {
TT_PROC,
TT_FUNC,
TT_MY,
+ TT_ARR,
TT_WHILE,
TT_UNTIL,
TT_NEXT,
@@ -167,7 +165,6 @@ typedef struct {
char *c_filename;
unsigned int u_token_id;
int i_ref_count;
- _Bool b_source_token;
Array *p_array;
} Token;
@@ -181,17 +178,13 @@ Token* token_new_(char *c_val, TokenType tt_cur, char *c_filename);
Token* token_new_dummy();
void token_copy_vals(Token *p_token_to, Token *p_token_from);
void token_delete(Token *p_token);
-void token_delete_force(Token *p_token);
-void token_delete_force_cb(void *p_token);
void token_delete_cb(void *p_token);
void token_ref_down_cb(void *p_token);
void* token_copy_cb(void *p_token);
char* tt_get_name(TokenType tt_cur);
void token_print_cb(void *p_void);
void token_print(Token *p_token);
-void token_print_ln(Token *p_token);
void token_print_val(Token *p_token);
-int token_ref_down(Token *p_token);
TokenType get_tt(char *c_token);
#endif