diff --git a/CMakeLists.txt b/CMakeLists.txt index 93d8d20..7bdee5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,7 @@ target_include_directories(dpli PRIVATE ${PROJECT_SOURCE_DIR}/include) target_link_libraries(dpli PRIVATE dpllib antlr4_static) -add_subdirectory(tests) +#add_subdirectory(tests) # Strip debug symbols in Release mode if(CMAKE_BUILD_TYPE STREQUAL "Release") diff --git a/src/Evaluator.cpp b/src/Evaluator.cpp index c27284d..9d956fe 100644 --- a/src/Evaluator.cpp +++ b/src/Evaluator.cpp @@ -167,9 +167,6 @@ void Evaluator::visit(const std::shared_ptr &node) { std::shared_ptr rightNode = node->getRightNode(); rightNode->accept(shared_from_this()); - bool numeric = leftNode->getVal().isNumeric() && rightNode->getVal().isNumeric(); - bool string = leftNode->getVal().is() && rightNode->getVal().is(); - // Evaluates the value of the expression node->setVal(leftNode->getVal() == rightNode->getVal()); } diff --git a/src/Value.cpp b/src/Value.cpp index d935baf..69e51ec 100644 --- a/src/Value.cpp +++ b/src/Value.cpp @@ -307,16 +307,16 @@ bool Value::operator>=(const Value& other) const { return *this > other || *this bool Value::operator!() const { if (is() || is()) { - return get() != 0; + return get() == 0; // not 0 == true } if (is()) { - return !get(); + return !get(); // not False == True } if (is()) { - return !get().empty(); + return get().empty(); // not "" == true } if (is()) { - return !get()->empty(); + return get()->empty(); // not [] == true } throw InternalException("Can not use NOT on this type");