2013-01-07 17:07:25 +00:00
|
|
|
/*
|
|
|
|
* ImportStatement.h
|
|
|
|
*
|
|
|
|
* Created on: Jan 7, 2013
|
|
|
|
* Author: att
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef IMPORTSTATEMENT_H_
|
|
|
|
#define IMPORTSTATEMENT_H_
|
|
|
|
|
|
|
|
#include <fstream>
|
|
|
|
#include <iostream>
|
2013-01-07 19:05:53 +00:00
|
|
|
#include <vector>
|
2013-01-07 17:07:25 +00:00
|
|
|
|
|
|
|
#include "ASTStatement.h"
|
|
|
|
#include "../Parser.h"
|
|
|
|
#include "../Lexer.h"
|
|
|
|
#include "../ContextManager.h"
|
|
|
|
|
|
|
|
class ImportStatement: public ASTStatement {
|
|
|
|
public:
|
|
|
|
std::string name_of_module;
|
2013-01-07 19:05:53 +00:00
|
|
|
std::vector<std::string> DEFAULT_LIB_PATHS;
|
2013-01-07 17:07:25 +00:00
|
|
|
ContextManager * context_manager;
|
2013-01-07 19:05:53 +00:00
|
|
|
bool correctly_imported;
|
2013-01-07 17:07:25 +00:00
|
|
|
ImportStatement(std::string name_of_module, ContextManager * context_manager);
|
2013-01-07 19:05:53 +00:00
|
|
|
ASTNode * import_body;
|
|
|
|
std::string strip_string(std::string text);
|
|
|
|
void prepare_defaults();
|
|
|
|
std::vector<std::string> prepare_paths(std::string name_of_module);
|
2013-01-07 17:07:25 +00:00
|
|
|
SenchaObject execute();
|
|
|
|
virtual ~ImportStatement();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* IMPORTSTATEMENT_H_ */
|