Clean up constuctors for AST_Node types
This commit is contained in:
@@ -38,7 +38,7 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Binary_Operator_AST_Node : public AST_Node {
|
struct Binary_Operator_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Binary_Operator_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Bitwise_Xor, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Binary_Operator_AST_Node(const std::string &t_ast_node_text, int t_id, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col)
|
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@@ -92,19 +92,19 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Error_AST_Node : public AST_Node {
|
struct Error_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Error_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Error, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Error_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Error, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
|
|
||||||
virtual ~Error_AST_Node() {}
|
virtual ~Error_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Int_AST_Node : public AST_Node {
|
struct Int_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Int_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Int, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Int_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
AST_Node(t_ast_node_text, AST_Node_Type::Int, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
||||||
m_value(const_var(int(atoi(t_ast_node_text.c_str())))) { }
|
m_value(const_var(int(atoi(t_ast_node_text.c_str())))) { }
|
||||||
Int_AST_Node(const std::string &t_ast_node_text, const Boxed_Value &t_bv, int t_id = AST_Node_Type::Int, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Int_AST_Node(const std::string &t_ast_node_text, const Boxed_Value &t_bv, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
AST_Node(t_ast_node_text, AST_Node_Type::Int, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
||||||
m_value(t_bv) { }
|
m_value(t_bv) { }
|
||||||
virtual ~Int_AST_Node() {}
|
virtual ~Int_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &){
|
||||||
@@ -118,11 +118,11 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Float_AST_Node : public AST_Node {
|
struct Float_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Float_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Float, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Float_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
AST_Node(t_ast_node_text, AST_Node_Type::Float, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
||||||
m_value(const_var(double(atof(t_ast_node_text.c_str())))) { }
|
m_value(const_var(double(atof(t_ast_node_text.c_str())))) { }
|
||||||
Float_AST_Node(const std::string &t_ast_node_text, const Boxed_Value &t_bv, int t_id = AST_Node_Type::Float, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Float_AST_Node(const std::string &t_ast_node_text, const Boxed_Value &t_bv, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
AST_Node(t_ast_node_text, AST_Node_Type::Float, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
||||||
m_value(t_bv) { }
|
m_value(t_bv) { }
|
||||||
virtual ~Float_AST_Node() {}
|
virtual ~Float_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &){
|
||||||
@@ -136,8 +136,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Id_AST_Node : public AST_Node {
|
struct Id_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Id_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Id, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Id_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
AST_Node(t_ast_node_text, AST_Node_Type::Id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
||||||
m_value(get_value(t_ast_node_text))
|
m_value(get_value(t_ast_node_text))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@@ -180,22 +180,22 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Char_AST_Node : public AST_Node {
|
struct Char_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Char_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Char, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Char_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Char, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Char_AST_Node() {}
|
virtual ~Char_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Str_AST_Node : public AST_Node {
|
struct Str_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Str_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Str, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Str_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Str, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Str_AST_Node() {}
|
virtual ~Str_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Eol_AST_Node : public AST_Node {
|
struct Eol_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Eol_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Eol, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Eol_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Eol, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Eol_AST_Node() {}
|
virtual ~Eol_AST_Node() {}
|
||||||
|
|
||||||
virtual std::string pretty_print() const
|
virtual std::string pretty_print() const
|
||||||
@@ -206,8 +206,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Fun_Call_AST_Node : public AST_Node {
|
struct Fun_Call_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Fun_Call_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Fun_Call, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Fun_Call_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Fun_Call, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Fun_Call_AST_Node() {}
|
virtual ~Fun_Call_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
chaiscript::eval::detail::Function_Push_Pop fpp(t_ss);
|
chaiscript::eval::detail::Function_Push_Pop fpp(t_ss);
|
||||||
@@ -275,8 +275,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Inplace_Fun_Call_AST_Node : public AST_Node {
|
struct Inplace_Fun_Call_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Inplace_Fun_Call_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Inplace_Fun_Call, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Inplace_Fun_Call_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Inplace_Fun_Call, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Inplace_Fun_Call_AST_Node() {}
|
virtual ~Inplace_Fun_Call_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
dispatch::Param_List_Builder plb;
|
dispatch::Param_List_Builder plb;
|
||||||
@@ -340,8 +340,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Arg_List_AST_Node : public AST_Node {
|
struct Arg_List_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Arg_List_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Arg_List, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Arg_List_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Arg_List, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Arg_List_AST_Node() {}
|
virtual ~Arg_List_AST_Node() {}
|
||||||
|
|
||||||
virtual std::string pretty_print() const
|
virtual std::string pretty_print() const
|
||||||
@@ -362,15 +362,15 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Variable_AST_Node : public AST_Node {
|
struct Variable_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Variable_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Variable, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Variable_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Variable, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Variable_AST_Node() {}
|
virtual ~Variable_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Equation_AST_Node : public AST_Node {
|
struct Equation_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Equation_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Equation, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Equation_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col)
|
AST_Node(t_ast_node_text, AST_Node_Type::Equation, t_fname, t_start_line, t_start_col, t_end_line, t_end_col)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~Equation_AST_Node() {}
|
virtual ~Equation_AST_Node() {}
|
||||||
@@ -429,8 +429,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Var_Decl_AST_Node : public AST_Node {
|
struct Var_Decl_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Var_Decl_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Var_Decl, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Var_Decl_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Var_Decl, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Var_Decl_AST_Node() {}
|
virtual ~Var_Decl_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
try {
|
try {
|
||||||
@@ -453,17 +453,17 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Comparison_AST_Node : public Binary_Operator_AST_Node {
|
struct Comparison_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Comparison_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Comparison, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Comparison_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Comparison, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Comparison_AST_Node() {}
|
virtual ~Comparison_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Addition_AST_Node : public Binary_Operator_AST_Node {
|
struct Addition_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Addition_AST_Node(const std::string &t_ast_node_text = "+", int t_id = AST_Node_Type::Addition,
|
Addition_AST_Node(const std::string &t_ast_node_text = "+",
|
||||||
const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(),
|
const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(),
|
||||||
int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Addition, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Addition_AST_Node() {}
|
virtual ~Addition_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
return do_oper(t_ss, Operators::sum, "+", this->children[0]->eval(t_ss), this->children[1]->eval(t_ss));
|
return do_oper(t_ss, Operators::sum, "+", this->children[0]->eval(t_ss), this->children[1]->eval(t_ss));
|
||||||
@@ -472,10 +472,10 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Subtraction_AST_Node : public Binary_Operator_AST_Node {
|
struct Subtraction_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Subtraction_AST_Node(const std::string &t_ast_node_text = "-", int t_id = AST_Node_Type::Subtraction,
|
Subtraction_AST_Node(const std::string &t_ast_node_text = "-",
|
||||||
const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0,
|
const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0,
|
||||||
int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Subtraction, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Subtraction_AST_Node() {}
|
virtual ~Subtraction_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
return do_oper(t_ss, Operators::difference, "-", this->children[0]->eval(t_ss), this->children[1]->eval(t_ss));
|
return do_oper(t_ss, Operators::difference, "-", this->children[0]->eval(t_ss), this->children[1]->eval(t_ss));
|
||||||
@@ -484,10 +484,10 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Multiplication_AST_Node : public Binary_Operator_AST_Node {
|
struct Multiplication_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Multiplication_AST_Node(const std::string &t_ast_node_text = "*", int t_id = AST_Node_Type::Multiplication,
|
Multiplication_AST_Node(const std::string &t_ast_node_text = "*",
|
||||||
const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0,
|
const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0,
|
||||||
int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Multiplication, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Multiplication_AST_Node() {}
|
virtual ~Multiplication_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
return do_oper(t_ss, Operators::product, "*", this->children[0]->eval(t_ss), this->children[1]->eval(t_ss));
|
return do_oper(t_ss, Operators::product, "*", this->children[0]->eval(t_ss), this->children[1]->eval(t_ss));
|
||||||
@@ -496,10 +496,10 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Division_AST_Node : public Binary_Operator_AST_Node {
|
struct Division_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Division_AST_Node(const std::string &t_ast_node_text = "/", int t_id = AST_Node_Type::Division,
|
Division_AST_Node(const std::string &t_ast_node_text = "/",
|
||||||
const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0,
|
const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0,
|
||||||
int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Division, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Division_AST_Node() {}
|
virtual ~Division_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
return do_oper(t_ss, Operators::quotient, "/", this->children[0]->eval(t_ss), this->children[1]->eval(t_ss));
|
return do_oper(t_ss, Operators::quotient, "/", this->children[0]->eval(t_ss), this->children[1]->eval(t_ss));
|
||||||
@@ -508,10 +508,10 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Modulus_AST_Node : public Binary_Operator_AST_Node {
|
struct Modulus_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Modulus_AST_Node(const std::string &t_ast_node_text = "%", int t_id = AST_Node_Type::Modulus,
|
Modulus_AST_Node(const std::string &t_ast_node_text = "%",
|
||||||
const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0,
|
const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0,
|
||||||
int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Modulus, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Modulus_AST_Node() {}
|
virtual ~Modulus_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
return do_oper(t_ss, Operators::remainder, "%", this->children[0]->eval(t_ss), this->children[1]->eval(t_ss));
|
return do_oper(t_ss, Operators::remainder, "%", this->children[0]->eval(t_ss), this->children[1]->eval(t_ss));
|
||||||
@@ -520,8 +520,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Array_Call_AST_Node : public AST_Node {
|
struct Array_Call_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Array_Call_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Array_Call, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Array_Call_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Array_Call, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Array_Call_AST_Node() {}
|
virtual ~Array_Call_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
chaiscript::eval::detail::Function_Push_Pop fpp(t_ss);
|
chaiscript::eval::detail::Function_Push_Pop fpp(t_ss);
|
||||||
@@ -568,8 +568,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Dot_Access_AST_Node : public AST_Node {
|
struct Dot_Access_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Dot_Access_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Dot_Access, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Dot_Access_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Dot_Access, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Dot_Access_AST_Node() {}
|
virtual ~Dot_Access_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
Boxed_Value retval = this->children[0]->eval(t_ss);
|
Boxed_Value retval = this->children[0]->eval(t_ss);
|
||||||
@@ -635,8 +635,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Quoted_String_AST_Node : public AST_Node {
|
struct Quoted_String_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Quoted_String_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Quoted_String, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Quoted_String_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
AST_Node(t_ast_node_text, AST_Node_Type::Quoted_String, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
||||||
m_value(const_var(t_ast_node_text)) { }
|
m_value(const_var(t_ast_node_text)) { }
|
||||||
virtual ~Quoted_String_AST_Node() {}
|
virtual ~Quoted_String_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &) {
|
||||||
@@ -655,8 +655,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Single_Quoted_String_AST_Node : public AST_Node {
|
struct Single_Quoted_String_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Single_Quoted_String_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Single_Quoted_String, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Single_Quoted_String_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
AST_Node(t_ast_node_text, AST_Node_Type::Single_Quoted_String, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
||||||
m_value(const_var(char(t_ast_node_text.at(0)))) { }
|
m_value(const_var(char(t_ast_node_text.at(0)))) { }
|
||||||
virtual ~Single_Quoted_String_AST_Node() {}
|
virtual ~Single_Quoted_String_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &){
|
||||||
@@ -674,8 +674,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Lambda_AST_Node : public AST_Node {
|
struct Lambda_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Lambda_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Lambda, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Lambda_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Lambda, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Lambda_AST_Node() {}
|
virtual ~Lambda_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
std::vector<std::string> t_param_names;
|
std::vector<std::string> t_param_names;
|
||||||
@@ -702,8 +702,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Block_AST_Node : public AST_Node {
|
struct Block_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Block_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Block, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Block_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Block, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Block_AST_Node() {}
|
virtual ~Block_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
const size_t num_children = this->children.size();
|
const size_t num_children = this->children.size();
|
||||||
@@ -731,8 +731,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Def_AST_Node : public AST_Node {
|
struct Def_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Def_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Def, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Def_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Def, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Def_AST_Node() {}
|
virtual ~Def_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
std::vector<std::string> t_param_names;
|
std::vector<std::string> t_param_names;
|
||||||
@@ -787,8 +787,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct While_AST_Node : public AST_Node {
|
struct While_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
While_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::While, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
While_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::While, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~While_AST_Node() {}
|
virtual ~While_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
chaiscript::eval::detail::Scope_Push_Pop spp(t_ss);
|
chaiscript::eval::detail::Scope_Push_Pop spp(t_ss);
|
||||||
@@ -816,8 +816,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Ternary_Cond_AST_Node : public AST_Node {
|
struct Ternary_Cond_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Ternary_Cond_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::If, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Ternary_Cond_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::If, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Ternary_Cond_AST_Node() {}
|
virtual ~Ternary_Cond_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
bool cond;
|
bool cond;
|
||||||
@@ -839,8 +839,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct If_AST_Node : public AST_Node {
|
struct If_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
If_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::If, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
If_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::If, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~If_AST_Node() {}
|
virtual ~If_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
bool cond;
|
bool cond;
|
||||||
@@ -884,8 +884,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct For_AST_Node : public AST_Node {
|
struct For_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
For_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::For, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
For_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::For, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~For_AST_Node() {}
|
virtual ~For_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
chaiscript::eval::detail::Scope_Push_Pop spp(t_ss);
|
chaiscript::eval::detail::Scope_Push_Pop spp(t_ss);
|
||||||
@@ -923,8 +923,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Switch_AST_Node : public AST_Node {
|
struct Switch_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Switch_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Switch, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Switch_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Switch, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Switch_AST_Node() {}
|
virtual ~Switch_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
Boxed_Value match_value;
|
Boxed_Value match_value;
|
||||||
@@ -966,8 +966,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Case_AST_Node : public AST_Node {
|
struct Case_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Case_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Case, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Case_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Case, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Case_AST_Node() {}
|
virtual ~Case_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
chaiscript::eval::detail::Scope_Push_Pop spp(t_ss);
|
chaiscript::eval::detail::Scope_Push_Pop spp(t_ss);
|
||||||
@@ -980,8 +980,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Default_AST_Node : public AST_Node {
|
struct Default_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Default_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Default, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Default_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Default, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Default_AST_Node() {}
|
virtual ~Default_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
chaiscript::eval::detail::Scope_Push_Pop spp(t_ss);
|
chaiscript::eval::detail::Scope_Push_Pop spp(t_ss);
|
||||||
@@ -994,8 +994,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Inline_Array_AST_Node : public AST_Node {
|
struct Inline_Array_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Inline_Array_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Inline_Array, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Inline_Array_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Inline_Array, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Inline_Array_AST_Node() {}
|
virtual ~Inline_Array_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
try {
|
try {
|
||||||
@@ -1018,8 +1018,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Inline_Map_AST_Node : public AST_Node {
|
struct Inline_Map_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Inline_Map_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Inline_Map, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Inline_Map_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Inline_Map, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Inline_Map_AST_Node() {}
|
virtual ~Inline_Map_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
try {
|
try {
|
||||||
@@ -1040,8 +1040,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Return_AST_Node : public AST_Node {
|
struct Return_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Return_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Return, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Return_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Return, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Return_AST_Node() {}
|
virtual ~Return_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
if (this->children.size() > 0) {
|
if (this->children.size() > 0) {
|
||||||
@@ -1056,8 +1056,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct File_AST_Node : public AST_Node {
|
struct File_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
File_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::File, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
File_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::File, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~File_AST_Node() {}
|
virtual ~File_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
const size_t size = this->children.size();
|
const size_t size = this->children.size();
|
||||||
@@ -1073,8 +1073,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Prefix_AST_Node : public AST_Node {
|
struct Prefix_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Prefix_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Prefix, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Prefix_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col)
|
AST_Node(t_ast_node_text, AST_Node_Type::Prefix, t_fname, t_start_line, t_start_col, t_end_line, t_end_col)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
virtual ~Prefix_AST_Node() {}
|
virtual ~Prefix_AST_Node() {}
|
||||||
@@ -1104,8 +1104,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Break_AST_Node : public AST_Node {
|
struct Break_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Break_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Break, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Break_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Break, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Break_AST_Node() {}
|
virtual ~Break_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &){
|
||||||
throw detail::Break_Loop();
|
throw detail::Break_Loop();
|
||||||
@@ -1114,8 +1114,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Continue_AST_Node : public AST_Node {
|
struct Continue_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Continue_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Continue, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Continue_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Continue, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Continue_AST_Node() {}
|
virtual ~Continue_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &){
|
||||||
throw detail::Continue_Loop();
|
throw detail::Continue_Loop();
|
||||||
@@ -1124,8 +1124,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Noop_AST_Node : public AST_Node {
|
struct Noop_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Noop_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Noop, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Noop_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
AST_Node(t_ast_node_text, AST_Node_Type::Noop, t_fname, t_start_line, t_start_col, t_end_line, t_end_col),
|
||||||
m_value(const_var(true))
|
m_value(const_var(true))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@@ -1141,22 +1141,22 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Map_Pair_AST_Node : public AST_Node {
|
struct Map_Pair_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Map_Pair_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Map_Pair, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Map_Pair_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Map_Pair, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Map_Pair_AST_Node() {}
|
virtual ~Map_Pair_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Value_Range_AST_Node : public AST_Node {
|
struct Value_Range_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Value_Range_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Value_Range, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Value_Range_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Value_Range, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Value_Range_AST_Node() {}
|
virtual ~Value_Range_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Inline_Range_AST_Node : public AST_Node {
|
struct Inline_Range_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Inline_Range_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Inline_Range, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Inline_Range_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Inline_Range, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Inline_Range_AST_Node() {}
|
virtual ~Inline_Range_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
try {
|
try {
|
||||||
@@ -1173,15 +1173,15 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Annotation_AST_Node : public AST_Node {
|
struct Annotation_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Annotation_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Annotation, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Annotation_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Annotation, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Annotation_AST_Node() {}
|
virtual ~Annotation_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Try_AST_Node : public AST_Node {
|
struct Try_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Try_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Try, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Try_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Try, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Try_AST_Node() {}
|
virtual ~Try_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
Boxed_Value retval;
|
Boxed_Value retval;
|
||||||
@@ -1309,22 +1309,22 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Catch_AST_Node : public AST_Node {
|
struct Catch_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Catch_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Catch, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Catch_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Catch, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Catch_AST_Node() {}
|
virtual ~Catch_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Finally_AST_Node : public AST_Node {
|
struct Finally_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Finally_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Finally, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Finally_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Finally, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Finally_AST_Node() {}
|
virtual ~Finally_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Method_AST_Node : public AST_Node {
|
struct Method_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Method_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Method, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Method_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Method, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Method_AST_Node() {}
|
virtual ~Method_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
|
|
||||||
@@ -1402,8 +1402,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Attr_Decl_AST_Node : public AST_Node {
|
struct Attr_Decl_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Attr_Decl_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Attr_Decl, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Attr_Decl_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Attr_Decl, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Attr_Decl_AST_Node() {}
|
virtual ~Attr_Decl_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
try {
|
try {
|
||||||
@@ -1431,43 +1431,43 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Shift_AST_Node : public Binary_Operator_AST_Node {
|
struct Shift_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Shift_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Shift, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Shift_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Shift, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Shift_AST_Node() {}
|
virtual ~Shift_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Equality_AST_Node : public Binary_Operator_AST_Node {
|
struct Equality_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Equality_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Equality, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Equality_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Equality, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Equality_AST_Node() {}
|
virtual ~Equality_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Bitwise_And_AST_Node : public Binary_Operator_AST_Node {
|
struct Bitwise_And_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Bitwise_And_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Bitwise_And, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Bitwise_And_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Bitwise_And, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Bitwise_And_AST_Node() {}
|
virtual ~Bitwise_And_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Bitwise_Xor_AST_Node : public Binary_Operator_AST_Node {
|
struct Bitwise_Xor_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Bitwise_Xor_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Bitwise_Xor, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Bitwise_Xor_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Bitwise_Xor, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Bitwise_Xor_AST_Node() {}
|
virtual ~Bitwise_Xor_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Bitwise_Or_AST_Node : public Binary_Operator_AST_Node {
|
struct Bitwise_Or_AST_Node : public Binary_Operator_AST_Node {
|
||||||
public:
|
public:
|
||||||
Bitwise_Or_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Bitwise_Or, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Bitwise_Or_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
Binary_Operator_AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
Binary_Operator_AST_Node(t_ast_node_text, AST_Node_Type::Bitwise_Or, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Bitwise_Or_AST_Node() {}
|
virtual ~Bitwise_Or_AST_Node() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Logical_And_AST_Node : public AST_Node {
|
struct Logical_And_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Logical_And_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Logical_And, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Logical_And_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Logical_And, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Logical_And_AST_Node() {}
|
virtual ~Logical_And_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
Boxed_Value retval = this->children[0]->eval(t_ss);
|
Boxed_Value retval = this->children[0]->eval(t_ss);
|
||||||
@@ -1500,8 +1500,8 @@ namespace chaiscript
|
|||||||
|
|
||||||
struct Logical_Or_AST_Node : public AST_Node {
|
struct Logical_Or_AST_Node : public AST_Node {
|
||||||
public:
|
public:
|
||||||
Logical_Or_AST_Node(const std::string &t_ast_node_text = "", int t_id = AST_Node_Type::Logical_Or, const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
Logical_Or_AST_Node(const std::string &t_ast_node_text = "", const boost::shared_ptr<std::string> &t_fname=boost::shared_ptr<std::string>(), int t_start_line = 0, int t_start_col = 0, int t_end_line = 0, int t_end_col = 0) :
|
||||||
AST_Node(t_ast_node_text, t_id, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
AST_Node(t_ast_node_text, AST_Node_Type::Logical_Or, t_fname, t_start_line, t_start_col, t_end_line, t_end_col) { }
|
||||||
virtual ~Logical_Or_AST_Node() {}
|
virtual ~Logical_Or_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
Boxed_Value retval;
|
Boxed_Value retval;
|
||||||
|
@@ -635,7 +635,7 @@ namespace chaiscript
|
|||||||
if (Hex_()) {
|
if (Hex_()) {
|
||||||
std::string match(start, m_input_pos);
|
std::string match(start, m_input_pos);
|
||||||
Boxed_Value i = buildInt(std::hex, match);
|
Boxed_Value i = buildInt(std::hex, match);
|
||||||
AST_NodePtr t(new eval::Int_AST_Node(match, i, AST_Node_Type::Int, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Int_AST_Node(match, i, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -660,14 +660,14 @@ namespace chaiscript
|
|||||||
i = Boxed_Value(const_var(temp_int));
|
i = Boxed_Value(const_var(temp_int));
|
||||||
}
|
}
|
||||||
|
|
||||||
AST_NodePtr t(new eval::Int_AST_Node(match, i, AST_Node_Type::Int, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Int_AST_Node(match, i, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (Float_()) {
|
if (Float_()) {
|
||||||
std::string match(start, m_input_pos);
|
std::string match(start, m_input_pos);
|
||||||
Boxed_Value f = buildFloat(match);
|
Boxed_Value f = buildFloat(match);
|
||||||
AST_NodePtr t(new eval::Float_AST_Node(match, f, AST_Node_Type::Float, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Float_AST_Node(match, f, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -676,12 +676,12 @@ namespace chaiscript
|
|||||||
std::string match(start, m_input_pos);
|
std::string match(start, m_input_pos);
|
||||||
if ((match.size() > 0) && (match[0] == '0')) {
|
if ((match.size() > 0) && (match[0] == '0')) {
|
||||||
Boxed_Value i = buildInt(std::oct, match);
|
Boxed_Value i = buildInt(std::oct, match);
|
||||||
AST_NodePtr t(new eval::Int_AST_Node(match, i, AST_Node_Type::Int, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Int_AST_Node(match, i, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Boxed_Value i = buildInt(std::dec, match);
|
Boxed_Value i = buildInt(std::dec, match);
|
||||||
AST_NodePtr t(new eval::Int_AST_Node(match, i, AST_Node_Type::Int, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Int_AST_Node(match, i, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -751,13 +751,13 @@ namespace chaiscript
|
|||||||
if (*start == '`') {
|
if (*start == '`') {
|
||||||
//Id Literal
|
//Id Literal
|
||||||
std::string match(start+1, m_input_pos-1);
|
std::string match(start+1, m_input_pos-1);
|
||||||
AST_NodePtr t(new eval::Id_AST_Node(match, AST_Node_Type::Id, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Id_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
std::string match(start, m_input_pos);
|
std::string match(start, m_input_pos);
|
||||||
AST_NodePtr t(new eval::Id_AST_Node(match, AST_Node_Type::Id, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Id_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -790,7 +790,7 @@ namespace chaiscript
|
|||||||
} while (Symbol("#"));
|
} while (Symbol("#"));
|
||||||
|
|
||||||
std::string match(start, m_input_pos);
|
std::string match(start, m_input_pos);
|
||||||
AST_NodePtr t(new eval::Annotation_AST_Node(match, AST_Node_Type::Annotation, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Annotation_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -865,13 +865,13 @@ namespace chaiscript
|
|||||||
if (is_interpolated) {
|
if (is_interpolated) {
|
||||||
//If we've seen previous interpolation, add on instead of making a new one
|
//If we've seen previous interpolation, add on instead of making a new one
|
||||||
|
|
||||||
AST_NodePtr t(new eval::Quoted_String_AST_Node(match, AST_Node_Type::Quoted_String, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Quoted_String_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
|
|
||||||
build_match(AST_NodePtr(new eval::Addition_AST_Node()), prev_stack_top);
|
build_match(AST_NodePtr(new eval::Addition_AST_Node()), prev_stack_top);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
AST_NodePtr t(new eval::Quoted_String_AST_Node(match, AST_Node_Type::Quoted_String, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Quoted_String_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -891,17 +891,17 @@ namespace chaiscript
|
|||||||
|
|
||||||
size_t tostr_stack_top = m_match_stack.size();
|
size_t tostr_stack_top = m_match_stack.size();
|
||||||
|
|
||||||
AST_NodePtr tostr(new eval::Id_AST_Node("to_string", AST_Node_Type::Id, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr tostr(new eval::Id_AST_Node("to_string", m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(tostr);
|
m_match_stack.push_back(tostr);
|
||||||
|
|
||||||
size_t ev_stack_top = m_match_stack.size();
|
size_t ev_stack_top = m_match_stack.size();
|
||||||
|
|
||||||
AST_NodePtr ev(new eval::Id_AST_Node("eval", AST_Node_Type::Id, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr ev(new eval::Id_AST_Node("eval", m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(ev);
|
m_match_stack.push_back(ev);
|
||||||
|
|
||||||
size_t arg_stack_top = m_match_stack.size();
|
size_t arg_stack_top = m_match_stack.size();
|
||||||
|
|
||||||
AST_NodePtr t(new eval::Quoted_String_AST_Node(eval_match, AST_Node_Type::Quoted_String, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Quoted_String_AST_Node(eval_match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
|
|
||||||
build_match(AST_NodePtr(new eval::Arg_List_AST_Node()), arg_stack_top);
|
build_match(AST_NodePtr(new eval::Arg_List_AST_Node()), arg_stack_top);
|
||||||
@@ -959,13 +959,13 @@ namespace chaiscript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_interpolated) {
|
if (is_interpolated) {
|
||||||
AST_NodePtr t(new eval::Quoted_String_AST_Node(match, AST_Node_Type::Quoted_String, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Quoted_String_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
|
|
||||||
build_match(AST_NodePtr(new eval::Addition_AST_Node()), prev_stack_top);
|
build_match(AST_NodePtr(new eval::Addition_AST_Node()), prev_stack_top);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
AST_NodePtr t(new eval::Quoted_String_AST_Node(match, AST_Node_Type::Quoted_String, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Quoted_String_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -1057,7 +1057,7 @@ namespace chaiscript
|
|||||||
is_escaped = false;
|
is_escaped = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AST_NodePtr t(new eval::Single_Quoted_String_AST_Node(match, AST_Node_Type::Single_Quoted_String, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Single_Quoted_String_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1096,7 +1096,7 @@ namespace chaiscript
|
|||||||
int prev_line = m_line;
|
int prev_line = m_line;
|
||||||
if (Char_(t_c)) {
|
if (Char_(t_c)) {
|
||||||
std::string match(start, m_input_pos);
|
std::string match(start, m_input_pos);
|
||||||
AST_NodePtr t(new eval::Char_AST_Node(match, AST_Node_Type::Char, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Char_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1148,7 +1148,7 @@ namespace chaiscript
|
|||||||
|
|
||||||
if ( t_capture && retval ) {
|
if ( t_capture && retval ) {
|
||||||
std::string match(start, m_input_pos);
|
std::string match(start, m_input_pos);
|
||||||
AST_NodePtr t(new eval::Str_AST_Node(match, AST_Node_Type::Str, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Str_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
@@ -1196,7 +1196,7 @@ namespace chaiscript
|
|||||||
|
|
||||||
if ( t_capture && retval ) {
|
if ( t_capture && retval ) {
|
||||||
std::string match(start, m_input_pos);
|
std::string match(start, m_input_pos);
|
||||||
AST_NodePtr t(new eval::Str_AST_Node(match, AST_Node_Type::Str, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Str_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1236,7 +1236,7 @@ namespace chaiscript
|
|||||||
int prev_line = m_line;
|
int prev_line = m_line;
|
||||||
if (Eol_()) {
|
if (Eol_()) {
|
||||||
std::string match(start, m_input_pos);
|
std::string match(start, m_input_pos);
|
||||||
AST_NodePtr t(new eval::Eol_AST_Node(match, AST_Node_Type::Eol, m_filename, prev_line, prev_col, m_line, m_col));
|
AST_NodePtr t(new eval::Eol_AST_Node(match, m_filename, prev_line, prev_col, m_line, m_col));
|
||||||
m_match_stack.push_back(t);
|
m_match_stack.push_back(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1506,7 +1506,7 @@ namespace chaiscript
|
|||||||
if (Keyword("else", true)) {
|
if (Keyword("else", true)) {
|
||||||
if (Keyword("if")) {
|
if (Keyword("if")) {
|
||||||
AST_NodePtr back(m_match_stack.back());
|
AST_NodePtr back(m_match_stack.back());
|
||||||
m_match_stack.back() = AST_NodePtr(new eval::If_AST_Node("else if", back->identifier));
|
m_match_stack.back() = AST_NodePtr(new eval::If_AST_Node("else if"));
|
||||||
m_match_stack.back()->start = back->start;
|
m_match_stack.back()->start = back->start;
|
||||||
m_match_stack.back()->end = back->end;
|
m_match_stack.back()->end = back->end;
|
||||||
m_match_stack.back()->children = back->children;
|
m_match_stack.back()->children = back->children;
|
||||||
|
Reference in New Issue
Block a user