Register AST_Node and Parser, overloaded eval for AST_Node and some const correctness fixes
This commit is contained in:
@@ -63,7 +63,7 @@ namespace chaiscript
|
||||
struct AST_Node {
|
||||
std::string text;
|
||||
int identifier;
|
||||
char *filename;
|
||||
const char *filename;
|
||||
File_Position start, end;
|
||||
bool is_cached;
|
||||
Boxed_Value cached_value;
|
||||
@@ -71,7 +71,7 @@ namespace chaiscript
|
||||
std::vector<AST_NodePtr> children;
|
||||
AST_NodePtr annotation;
|
||||
|
||||
AST_Node(const std::string &ast_node_text, int id, char *fname, int start_line, int start_col, int end_line, int end_col) :
|
||||
AST_Node(const std::string &ast_node_text, int id, const char *fname, int start_line, int start_col, int end_line, int end_col) :
|
||||
text(ast_node_text), identifier(id), filename(fname), is_cached(false) {
|
||||
|
||||
start.line = start_line;
|
||||
@@ -79,7 +79,7 @@ namespace chaiscript
|
||||
end.line = end_line;
|
||||
end.column = end_col;
|
||||
}
|
||||
AST_Node(const std::string &ast_node_text, int id, char *fname) :
|
||||
AST_Node(const std::string &ast_node_text, int id, const char *fname) :
|
||||
text(ast_node_text), identifier(id), filename(fname), is_cached(false) { }
|
||||
|
||||
|
||||
@@ -97,278 +97,278 @@ namespace chaiscript
|
||||
|
||||
struct Error_AST_Node : public AST_Node {
|
||||
public:
|
||||
Error_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Error, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Error_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Error, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Int_AST_Node : public AST_Node {
|
||||
public:
|
||||
Int_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Int, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Int_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Int, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Float_AST_Node : public AST_Node {
|
||||
public:
|
||||
Float_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Float, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Float_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Float, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Id_AST_Node : public AST_Node {
|
||||
public:
|
||||
Id_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Id, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Id_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Id, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Char_AST_Node : public AST_Node {
|
||||
public:
|
||||
Char_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Char, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Char_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Char, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Str_AST_Node : public AST_Node {
|
||||
public:
|
||||
Str_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Str, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Str_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Str, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Eol_AST_Node : public AST_Node {
|
||||
public:
|
||||
Eol_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Eol, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Eol_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Eol, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Fun_Call_AST_Node : public AST_Node {
|
||||
public:
|
||||
Fun_Call_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Fun_Call, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Fun_Call_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Fun_Call, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Inplace_Fun_Call_AST_Node : public AST_Node {
|
||||
public:
|
||||
Inplace_Fun_Call_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Inplace_Fun_Call, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Inplace_Fun_Call_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Inplace_Fun_Call, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Arg_List_AST_Node : public AST_Node {
|
||||
public:
|
||||
Arg_List_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Arg_List, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Arg_List_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Arg_List, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Variable_AST_Node : public AST_Node {
|
||||
public:
|
||||
Variable_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Variable, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Variable_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Variable, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Equation_AST_Node : public AST_Node {
|
||||
public:
|
||||
Equation_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Equation, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Equation_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Equation, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Var_Decl_AST_Node : public AST_Node {
|
||||
public:
|
||||
Var_Decl_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Var_Decl, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Var_Decl_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Var_Decl, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Comparison_AST_Node : public AST_Node {
|
||||
public:
|
||||
Comparison_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Comparison, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Comparison_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Comparison, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Additive_AST_Node : public AST_Node {
|
||||
public:
|
||||
Additive_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Additive, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Additive_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Additive, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Multiplicative_AST_Node : public AST_Node {
|
||||
public:
|
||||
Multiplicative_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Multiplicative, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Multiplicative_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Multiplicative, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Array_Call_AST_Node : public AST_Node {
|
||||
public:
|
||||
Array_Call_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Array_Call, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Array_Call_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Array_Call, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Dot_Access_AST_Node : public AST_Node {
|
||||
public:
|
||||
Dot_Access_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Dot_Access, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Dot_Access_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Dot_Access, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Quoted_String_AST_Node : public AST_Node {
|
||||
public:
|
||||
Quoted_String_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Quoted_String, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Quoted_String_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Quoted_String, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Single_Quoted_String_AST_Node : public AST_Node {
|
||||
public:
|
||||
Single_Quoted_String_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Single_Quoted_String, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Single_Quoted_String_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Single_Quoted_String, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Lambda_AST_Node : public AST_Node {
|
||||
public:
|
||||
Lambda_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Lambda, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Lambda_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Lambda, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Block_AST_Node : public AST_Node {
|
||||
public:
|
||||
Block_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Block, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Block_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Block, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Def_AST_Node : public AST_Node {
|
||||
public:
|
||||
Def_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Def, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Def_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Def, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct While_AST_Node : public AST_Node {
|
||||
public:
|
||||
While_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::While, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
While_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::While, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct If_AST_Node : public AST_Node {
|
||||
public:
|
||||
If_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::If, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
If_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::If, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct For_AST_Node : public AST_Node {
|
||||
public:
|
||||
For_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::For, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
For_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::For, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Inline_Array_AST_Node : public AST_Node {
|
||||
public:
|
||||
Inline_Array_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Inline_Array, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Inline_Array_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Inline_Array, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Inline_Map_AST_Node : public AST_Node {
|
||||
public:
|
||||
Inline_Map_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Inline_Map, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Inline_Map_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Inline_Map, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Return_AST_Node : public AST_Node {
|
||||
public:
|
||||
Return_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Return, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Return_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Return, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct File_AST_Node : public AST_Node {
|
||||
public:
|
||||
File_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::File, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
File_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::File, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Prefix_AST_Node : public AST_Node {
|
||||
public:
|
||||
Prefix_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Prefix, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Prefix_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Prefix, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Break_AST_Node : public AST_Node {
|
||||
public:
|
||||
Break_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Break, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Break_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Break, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Map_Pair_AST_Node : public AST_Node {
|
||||
public:
|
||||
Map_Pair_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Map_Pair, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Map_Pair_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Map_Pair, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Value_Range_AST_Node : public AST_Node {
|
||||
public:
|
||||
Value_Range_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Value_Range, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Value_Range_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Value_Range, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Inline_Range_AST_Node : public AST_Node {
|
||||
public:
|
||||
Inline_Range_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Inline_Range, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Inline_Range_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Inline_Range, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Annotation_AST_Node : public AST_Node {
|
||||
public:
|
||||
Annotation_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Annotation, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Annotation_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Annotation, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Try_AST_Node : public AST_Node {
|
||||
public:
|
||||
Try_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Try, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Try_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Try, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Catch_AST_Node : public AST_Node {
|
||||
public:
|
||||
Catch_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Catch, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Catch_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Catch, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Finally_AST_Node : public AST_Node {
|
||||
public:
|
||||
Finally_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Finally, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Finally_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Finally, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
};
|
||||
struct Method_AST_Node : public AST_Node {
|
||||
public:
|
||||
Method_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Method, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Method_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Method, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Attr_Decl_AST_Node : public AST_Node {
|
||||
public:
|
||||
Attr_Decl_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Attr_Decl, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Attr_Decl_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Attr_Decl, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Shift_AST_Node : public AST_Node {
|
||||
public:
|
||||
Shift_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Shift, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Shift_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Shift, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Equality_AST_Node : public AST_Node {
|
||||
public:
|
||||
Equality_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Equality, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Equality_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Equality, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Bitwise_And_AST_Node : public AST_Node {
|
||||
public:
|
||||
Bitwise_And_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Bitwise_And, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Bitwise_And_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Bitwise_And, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Bitwise_Xor_AST_Node : public AST_Node {
|
||||
public:
|
||||
Bitwise_Xor_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Bitwise_Xor, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Bitwise_Xor_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Bitwise_Xor, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Bitwise_Or_AST_Node : public AST_Node {
|
||||
public:
|
||||
Bitwise_Or_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Bitwise_Or, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Bitwise_Or_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Bitwise_Or, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Logical_And_AST_Node : public AST_Node {
|
||||
public:
|
||||
Logical_And_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Logical_And, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Logical_And_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Logical_And, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
struct Logical_Or_AST_Node : public AST_Node {
|
||||
public:
|
||||
Logical_Or_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Logical_Or, char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
Logical_Or_AST_Node(const std::string &ast_node_text = "", int id = AST_Node_Type::Logical_Or, const char *fname = NULL, int start_line = 0, int start_col = 0, int end_line = 0, int end_col = 0) :
|
||||
AST_Node(ast_node_text, id, fname, start_line, start_col, end_line, end_col) { }
|
||||
Boxed_Value eval(Dispatch_Engine &ss);
|
||||
};
|
||||
|
Reference in New Issue
Block a user