more usefull typedefs int ast/ast.hh
[ozulis.git] / src / ast / generator.hh
blobc21b6b6da126e1052e4d7038e7054fc792da625c
1 #ifndef GENERATOR_HH
2 # define GENERATOR_HH
4 # include <string>
5 # include <vector>
7 namespace ast
9 namespace generator
11 struct Attribute
13 const std::string type;
14 const std::string name;
17 struct Node
19 const std::string name;
20 const std::string parent;
21 const std::string description;
22 const Attribute attrs[100];
25 extern const Node nodes[];
27 bool isNode(const std::string & type);
28 bool isVectorOfNode(const std::string & type);
29 bool isPrintable(const std::string & type);
30 const Node * findNodeByName(const std::string & name);
31 std::vector<const Attribute *> allAttributes(const Node * node);
32 void appendGeneratedWarning(std::ostream & out);
33 std::string deref(std::string type);
37 # define NL << std::endl
39 extern template class std::vector<ast::generator::Attribute *>;
41 #endif /* !GENERATOR_HH */