Fixed expressions to be able to do math with nested expressions.

This commit is contained in:
Brad Arant committed 2024-09-30 14:20:59 -07:00
1 parent 0b9f2354a3
commit aa090c8a73
11 files changed
+86 -98

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
#include "__set.h"
#include "Exception.h"
#include "Expression.h"
#include "Operand.h"
#include <iostream>
namespace jet {
@@ -21,7 +21,7 @@ namespace jet {
if(variableDefined("expr")) {
if(variableDefined("eval"))
throw coreutils::Exception("Cannot use eval with expr.");
global.variables[variables["name"]] = Expression(variables["expr"]).string;
global.variables[variables["name"]] = Operand(variables["expr"]).string;
} else if(hasContainer) {
processContainer(container);
if(evaluate) {