Merge remote-tracking branch 'origin/release-4.x'

Conflicts:
	.travis.yml
	CMakeLists.txt
	include/chaiscript/dispatchkit/bootstrap.hpp
	include/chaiscript/dispatchkit/boxed_cast.hpp
	include/chaiscript/dispatchkit/dynamic_cast_conversion.hpp
	include/chaiscript/dispatchkit/function_call_detail.hpp
	include/chaiscript/dispatchkit/proxy_functions.hpp
	include/chaiscript/language/chaiscript_common.hpp
This commit is contained in:
Jason Turner
2014-03-29 07:30:14 -06:00
16 changed files with 220 additions and 87 deletions

View File

@@ -54,7 +54,7 @@ namespace chaiscript
};
/// \brief Typedef for pointers to AST_Node objects. Used in building of the AST_Node tree
typedef std::shared_ptr<struct AST_Node> AST_NodePtr;
typedef std::shared_ptr<AST_Node> AST_NodePtr;
/// \brief Classes which may be thrown during error cases when ChaiScript is executing.
@@ -435,7 +435,7 @@ namespace chaiscript
return eval_internal(t_e);
} catch (exception::eval_error &ee) {
ee.call_stack.push_back(shared_from_this());
throw ee;
throw;
}
}

View File

@@ -742,7 +742,7 @@ namespace chaiscript
if (t_handler) {
t_handler->handle(bv, m_engine);
}
throw bv;
throw;
}
}
@@ -768,7 +768,7 @@ namespace chaiscript
if (t_handler) {
t_handler->handle(bv, m_engine);
}
throw bv;
throw;
}
}
@@ -798,7 +798,7 @@ namespace chaiscript
if (t_handler) {
t_handler->handle(bv, m_engine);
}
throw bv;
throw;
}
}
@@ -814,7 +814,7 @@ namespace chaiscript
if (t_handler) {
t_handler->handle(bv, m_engine);
}
throw bv;
throw;
}
}
@@ -834,7 +834,7 @@ namespace chaiscript
if (t_handler) {
t_handler->handle(bv, m_engine);
}
throw bv;
throw;
}
}
};

View File

@@ -56,7 +56,8 @@ namespace chaiscript
public:
ChaiScript_Parser()
: m_multiline_comment_begin("/*"),
: m_line(-1), m_col(-1),
m_multiline_comment_begin("/*"),
m_multiline_comment_end("*/"),
m_singleline_comment("//")
{
@@ -803,10 +804,9 @@ namespace chaiscript
*/
bool Quoted_String_() {
bool retval = false;
char prev_char = 0;
if (has_more_input() && (*m_input_pos == '\"')) {
retval = true;
prev_char = *m_input_pos;
char prev_char = *m_input_pos;
++m_input_pos;
++m_col;
@@ -980,10 +980,9 @@ namespace chaiscript
*/
bool Single_Quoted_String_() {
bool retval = false;
char prev_char = 0;
if (has_more_input() && (*m_input_pos == '\'')) {
retval = true;
prev_char = *m_input_pos;
char prev_char = *m_input_pos;
++m_input_pos;
++m_col;
@@ -1356,7 +1355,6 @@ namespace chaiscript
bool Def() {
bool retval = false;
bool is_annotated = false;
bool is_method = false;
AST_NodePtr annotation;
if (Annotation()) {
@@ -1375,6 +1373,8 @@ namespace chaiscript
throw exception::eval_error("Missing function name in definition", File_Position(m_line, m_col), *m_filename);
}
bool is_method = false;
if (Symbol("::", false)) {
//We're now a method
is_method = true;