summaryrefslogtreecommitdiff
path: root/syntax.h
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2015-12-18 21:13:02 +0000
committerFreeArtMan <dos21h@gmail.com>2015-12-18 21:13:02 +0000
commit2441dad315cdf050995e5b1fb48bf9e871fe791c (patch)
tree4d689a86e048a3727b42600d075c5dac512258e3 /syntax.h
parent4c058db338ff00e0e97cea0e985625deb47143cd (diff)
downloaddm-2441dad315cdf050995e5b1fb48bf9e871fe791c.tar.gz
dm-2441dad315cdf050995e5b1fb48bf9e871fe791c.zip
Added assertions all over the code. Fixed missing () in realloc size calc part that caused mem violation problem
Diffstat (limited to 'syntax.h')
-rw-r--r--syntax.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/syntax.h b/syntax.h
index 1bdf984..a2efdfe 100644
--- a/syntax.h
+++ b/syntax.h
@@ -10,6 +10,8 @@
#include "debug.h"
#include "tokenizer.h"
+
+
#define ALLOC_MEMSET(T,VAL) {VAL=malloc(sizeof(T));memset(VAL,0,sizeof(T));}
@@ -93,7 +95,7 @@ ast_expr_cmp* att_expr_cmp( token_list *tl, int pos );
ast_expr_bit* att_expr_bit( token_list *tl, int pos );
ast_value* att_value( token_list *tl, int pos );
ast_root* atrt_i();
-int atrt_a_range( ast_root **rt, ast_range *rng, int idx);
+int atrt_a_range( ast_root **rt, ast_range *rng);
ast_range* atrn_i();
int atrn_a_if( ast_range **rng, ast_if *iff );
int atrn_a_val( ast_range **rng, ast_value *val );
@@ -114,5 +116,6 @@ int atec_s_val( ast_expr_cmp **expr, unsigned char val );
ast_value* atv_i();
int atv_s_note( ast_value **val, char *note, int size);
int print_ast( ast_root *root );
+int ast_destroy( ast_root *root );
#endif \ No newline at end of file