Allow operator exprs to span lines
This commit is contained in:
parent
a818e7b185
commit
4aec12c68f
@ -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",
|
||||
|
4
unittests/multiline_oper.chai
Normal file
4
unittests/multiline_oper.chai
Normal file
@ -0,0 +1,4 @@
|
||||
var x = 3 +
|
||||
4
|
||||
|
||||
assert_equal(x, 7);
|
Loading…
x
Reference in New Issue
Block a user