Skip to content

Commit

Permalink
Revert "Add debug function."
Browse files Browse the repository at this point in the history
This reverts commit f95ee3f.
  • Loading branch information
dillof committed Aug 24, 2024
1 parent e755ff9 commit c13264b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
17 changes: 0 additions & 17 deletions src/Environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "Environment.h"

#include <iostream>
#include <ranges>

std::optional<Expression> Environment::operator[](Symbol name) const { // NOLINT(misc-no-recursion)
auto it = variables.find(name);
if (it != variables.end()) {
Expand Down Expand Up @@ -100,17 +97,3 @@ const Macro* Environment::get_macro(Symbol name) const { // NOLINT(misc-no-recur
return nullptr;
}


void Environment::dump(const std::string& indent) {
std::cout << indent << "variables:" << std::endl;
for (const auto& name: variables | std::views::keys) {
std::cout << indent << " " << name << std::endl;
}

if (!next.empty()) {
std::cout << indent << "next:" << std::endl;
for (const auto& environment: next) {
environment->dump(indent + " ");
}
}
}
2 changes: 0 additions & 2 deletions src/Environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ class Environment {

void replace(const std::shared_ptr<Environment>& old_next, const std::shared_ptr<Environment>& new_next);

void dump(const std::string& indent = "");

UnnamedLabelList unnamed_labels;

private:
Expand Down

0 comments on commit c13264b

Please sign in to comment.