This repository has been archived by the owner on Sep 14, 2018. It is now read-only.
forked from matthiaskramm/mrscake
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ast_transforms.h
47 lines (35 loc) · 1.61 KB
/
ast_transforms.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* ast_transforms.h
AST transformations and queries
Part of the data prediction package.
Copyright (c) 2011 Matthias Kramm <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef __ast_transforms__
#define __ast_transforms__
#include "ast.h"
node_t* node_prepare_for_code_generation(node_t*n);
node_t* node_insert_brackets(node_t*n) ;
node_t* node_do_cascade_returns(node_t*n) ;
bool node_has_consumer_parent(node_t*n);
node_t* node_add_return(node_t*n);
bool node_has_minus_prefix(node_t*n);
bool node_is_missing(node_t*n);
bool node_terminates(node_t*n);
constant_type_t node_type(node_t*n, model_t*m);
constant_type_t node_array_element_type(node_t*n);
int node_array_size(node_t*n);
int node_highest_local(node_t*node);
constant_type_t*node_local_types(node_t*node, model_t*m, int* num_locals);
constant_type_t model_param_type(model_t*m, int var);
bool node_has_child(node_t*n, nodetype_t*type);
node_t* node_optimize(node_t*n);
#endif