Change equation to clone rhs. Add := ref equation. Failed clones will ref copy

This commit is contained in:
Jonathan Turner
2009-07-01 16:48:27 +00:00
parent 5f96b39c08
commit 27f6ec7b70
2 changed files with 59 additions and 8 deletions

View File

@@ -1180,7 +1180,7 @@ namespace chaiscript
if (Expression()) {
retval = true;
if (Symbol("=", true) || Symbol("+=", true) || Symbol("-=", true) || Symbol("*=", true) || Symbol("/=", true)) {
if (Symbol("=", true) || Symbol(":=", true) || Symbol("+=", true) || Symbol("-=", true) || Symbol("*=", true) || Symbol("/=", true)) {
if (!Equation()) {
throw Parse_Error("Incomplete equation", match_stack.back());
}