/*
 * ImportStatement.h
 *
 *  Created on: Jan 7, 2013
 *      Author: att
 */

#ifndef IMPORTSTATEMENT_H_
#define IMPORTSTATEMENT_H_

#include <fstream>
#include <iostream>
#include <vector>

#include "ASTStatement.h"
#include "../Parser.h"
#include "../Lexer.h"
#include "../ContextManager.h"

class ImportStatement: public ASTStatement {
public:
	std::string name_of_module;
	std::vector<std::string> DEFAULT_LIB_PATHS;
	ContextManager * context_manager;
	bool correctly_imported;

	ImportStatement(std::string name_of_module, ContextManager * context_manager);
	ASTNode * import_body;
	std::string strip_string(std::string text);
	void prepare_defaults();
	std::vector<std::string> prepare_paths(std::string name_of_module);
	SenchaObject execute();
	SenchaObject evaluate() {
		return SenchaObject(correctly_imported);
	}
	virtual ~ImportStatement();
};

#endif /* IMPORTSTATEMENT_H_ */
