Files
kraken/include/ASTData.h

36 lines
834 B
C
Raw Normal View History

#ifndef ASTDATA_H
#define ASTDATA_H
#include <vector>
2013-12-27 13:05:07 -06:00
#include <map>
#include "Symbol.h"
#include "Type.h"
#ifndef NULL
#define NULL 0
#endif
enum ASTType {undef, translation_unit, interpreter_directive, import, identifier,
function, code_block,
typed_parameter, expression, boolean_expression, statement,
if_statement, while_loop, for_loop, return_statement, assignment_statement, declaration_statement,
if_comp, simple_passthrough, function_call, value};
class ASTData {
public:
2013-10-16 01:43:18 -04:00
ASTData();
ASTData(ASTType type, Type valueType = Type());
ASTData(ASTType type, Symbol symbol, Type valueType = Type());
~ASTData();
std::string toString();
2013-10-16 01:43:18 -04:00
static std::string ASTTypeToString(ASTType type);
ASTType type;
Type valueType;
Symbol symbol;
2013-12-27 13:05:07 -06:00
std::map<std::string, NodeTree<ASTData>*> scope;
private:
};
#endif