Allow operator exprs to span lines

This commit is contained in:
Jonathan Turner 2012-05-20 10:47:50 -07:00
parent a818e7b185
commit 4aec12c68f
2 changed files with 5 additions and 0 deletions

View File

@ -1808,6 +1808,7 @@ namespace chaiscript
retval = true;
if (Operator_Helper(t_precedence)) {
do {
while (Eol()) {}
if (!Operator(t_precedence+1)) {
throw exception::eval_error("Incomplete "
+ std::string(ast_node_type_to_string(m_operators[t_precedence])) + " expression",

View File

@ -0,0 +1,4 @@
var x = 3 +
4
assert_equal(x, 7);