#ifndef QLOW_SEMANTIC_H #define QLOW_SEMANTIC_H #include #include #include "Util.h" #include "Ast.h" namespace qlow { namespace sem { /*! * \brief contains owning pointers to elements */ template using SymbolTable = std::map>; struct SemanticObject; struct Class; struct Field; struct Method; SymbolTable createFromAst(std::vector>& classes); } } struct qlow::sem::SemanticObject { virtual ~SemanticObject(void); }; struct qlow::sem::Class : public SemanticObject { std::string name; SymbolTable fields; SymbolTable methods; }; struct qlow::sem::Field : public SemanticObject { Class* type; std::string name; }; struct qlow::sem::Method : public SemanticObject { Class* returnType; std::string name; }; #endif // QLOW_SEMANTIC_H