diff --git a/src/n8/ast/statement/DeleteStatement.cpp b/src/n8/ast/statement/DeleteStatement.cpp new file mode 100644 index 0000000..ce6a2bb --- /dev/null +++ b/src/n8/ast/statement/DeleteStatement.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2024 - Nathanne Isip + * This file is part of N8. + * + * N8 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation, either version 3 of the License, + * or (at your option) any later version. + * + * N8 is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with N8. If not, see . + */ + +#include + +DynamicObject DeleteStatement::visit(SymbolTable& symbols) { + for(const auto& variable : this->variables) + symbols.removeSymbol(variable); + + return {}; +}