Changed the FNV include path
[fridhskrift.git] / fridh / symbol.hpp
blobb2872d6380df8b21adb0cbb14a3174ed281374f5
1 #pragma once
3 #include <map>
4 #include <string>
5 #include <fridh/construction.hpp>
7 namespace fridh
9 namespace symbol
11 enum type
13 uninitialised,
15 function,
16 class_symbol,
17 module
21 struct symbol_tree_node;
22 struct function;
23 struct class_type;
24 struct module;
26 class variable;
28 typedef std::map<std::string, symbol_tree_node *> node_children;
30 struct symbol_tree_node
32 symbol::type type;
33 union
35 function * function_pointer;
36 class_type * class_pointer;
37 module * module_pointer;
40 node_children children;
41 symbol_tree_node * parent;
43 symbol_tree_node();
44 symbol_tree_node(symbol_tree_node const & other);
45 symbol_tree_node(symbol::type type);
46 ~symbol_tree_node();
48 symbol_tree_node & operator=(symbol_tree_node const & other);
50 void copy(symbol_tree_node const & other);
51 void destroy();
53 bool exists(std::string const & name);
54 bool find_entity(std::string const & name, symbol_tree_node * & output);
58 #include <fridh/variable.hpp>
59 #include <fridh/class.hpp>
60 #include <fridh/function.hpp>
61 #include <fridh/module.hpp>