Files
kraken/include/ASTTransformation.h

32 lines
1.2 KiB
C
Raw Normal View History

#ifndef ASTTRANSFORMATION_H
#define ASTTRANSFORMATION_H
2013-12-27 13:05:07 -06:00
#include <set>
#include <map>
2014-01-07 13:14:58 -05:00
#include "Type.h"
#include "ASTData.h"
#include "NodeTransformation.h"
#include "Importer.h"
class Importer;
class ASTTransformation: public NodeTransformation<Symbol,ASTData> {
public:
ASTTransformation(Importer* importerIn);
~ASTTransformation();
virtual NodeTree<ASTData>* transform(NodeTree<Symbol>* from);
NodeTree<ASTData>* transform(NodeTree<Symbol>* from, NodeTree<ASTData>* scope, std::vector<Type> types = std::vector<Type>());
std::vector<NodeTree<ASTData>*> transformChildren(std::vector<NodeTree<Symbol>*> children, std::set<int> skipChildren, NodeTree<ASTData>* scope, std::vector<Type> types);
std::vector<Type> mapNodesToTypes(std::vector<NodeTree<ASTData>*> nodes);
2013-10-16 01:43:18 -04:00
std::string concatSymbolTree(NodeTree<Symbol>* root);
NodeTree<ASTData>* scopeLookup(NodeTree<ASTData>* scope, std::string lookup, std::vector<NodeTree<ASTData>*> nodes);
NodeTree<ASTData>* scopeLookup(NodeTree<ASTData>* scope, std::string lookup, std::vector<Type> types = std::vector<Type>());
2014-01-07 13:14:58 -05:00
Type* typeFromString(std::string type, NodeTree<ASTData>* scope);
private:
Importer * importer;
std::map<std::string, std::vector<NodeTree<ASTData>*>> languageLevelScope;
};
2014-02-18 21:55:00 -05:00
#endif