Implement constant expression folding

This commit is contained in:
Jason Turner
2016-04-11 08:19:02 -06:00
parent 40694c798c
commit fe8f8a89a7
2 changed files with 32 additions and 1 deletions

View File

@@ -737,6 +737,7 @@ namespace chaiscript
} else {
if (children.size() > 2) {
size_t i = 2;
/// \todo these string comparisons are clunky
while (i < children.size()) {
if (children[i]->text == "else") {
return children[i+1]->eval(t_ss);