1 #include <fridh/symbol.hpp>
5 parse_tree_node::parse_tree_node():
6 type(parse_tree_node_type::uninitialised
)
10 parse_tree_node::parse_tree_node(variable
* variable_pointer
):
11 type(parse_tree_node_type::variable
),
12 variable_pointer(variable_pointer
)
16 parse_tree_node::parse_tree_node(unary_operator_type::type unary_operator
):
17 type(parse_tree_node::unary_operator
)
19 unary_operator_pointer
= new parse_tree_unary_operator_node
;
20 unary_operator_pointer
->type
= unary_operator
;
23 parse_tree_node::parse_tree_node(binary_operator_type::type binary_operator
)
24 type(parse_tree_node::binary_operator
)
26 binary_operator_pointer
= new parse_tree_binary_operator_node
;
27 binary_operator_pointer
->type
= binary_operator
;
30 parse_tree_node::parse_tree_node(parse_tree_nodes
& elements
):
31 type(parse_tree_node::array
)
33 array_pointer
= new parse_tree_array
;
34 array_pointer
->elements
= elements
;
37 void parse_tree_node::is_call()
39 type
= parse_tree_node_type::call
;
40 call_pointer
= new parse_tree_call
;
43 parse_tree_symbol::parse_tree_symbol():
44 type(symbol_prefix::none
)