forked from Wilfred/babyc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathast_annotate.h
32 lines (23 loc) · 1.03 KB
/
ast_annotate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* ----------------------------------------------------------------
*
* BabyC Toy compiler for educational purposes
*
* ---------------------------------------------------------------- */
#ifndef AST_ANNNOTATE_H_H
#define AST_ANNNOTATE_H_H
#include "syntax.h"
void ast_annotate_syntax_tree(Syntax *syntax);
void ast_integer_set_str(AstInteger *p, char *str, int radic);
void ast_integer_set_bool(AstInteger *p, bool b);
void ast_integer_set_int(AstInteger *p, int i);
char *ast_integer_get_str(AstInteger *p, char *str, int len);
int ast_integer_get_int(AstInteger *p);
unsigned int ast_integer_get_uint(AstInteger *p);
unsigned long long ast_integer_get_unsigned_long_long(AstInteger *p);
void ast_integer_binary_operation(AstInteger *p, AstInteger *a, AstInteger *b,
BinaryExpressionType type);
void ast_integer_unary_operation(AstInteger *p, AstInteger *b,
UnaryExpressionType type);
bool ast_integer_is_zero(AstInteger *p);
bool ast_integer_is_one(AstInteger *p);
#endif