Modernize and remove useless header text
This commit is contained in:
@@ -1,22 +1,6 @@
|
||||
// Code Compiler for BlitzLLVM
|
||||
// Copyright(C) 2017 Michael Fabian Dirks
|
||||
//
|
||||
// This program 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.
|
||||
//
|
||||
// This program 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 this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "arithmetic.hpp"
|
||||
|
||||
BlitzLLVM::AST::ArithmeticExpression::ArithmeticExpression(Operator op, std::unique_ptr<Expression> left, std::unique_ptr<Expression> right)
|
||||
blitz::AST::ArithmeticExpression::ArithmeticExpression(Operator op, std::unique_ptr<Expression> left, std::unique_ptr<Expression> right)
|
||||
: m_operator(op), m_left(std::move(left)), m_right(std::move(right)) {}
|
||||
|
||||
BlitzLLVM::AST::ArithmeticExpression::~ArithmeticExpression() {}
|
||||
blitz::AST::ArithmeticExpression::~ArithmeticExpression() {}
|
||||
|
||||
@@ -1,24 +1,8 @@
|
||||
// Code Compiler for BlitzLLVM
|
||||
// Copyright(C) 2017 Michael Fabian Dirks
|
||||
//
|
||||
// This program 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.
|
||||
//
|
||||
// This program 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 this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
#include "ast.hpp"
|
||||
#include "value.hpp"
|
||||
|
||||
namespace BlitzLLVM {
|
||||
namespace blitz {
|
||||
namespace AST {
|
||||
enum class Operator : int8_t {
|
||||
Add, /*+*/
|
||||
|
||||
@@ -1,17 +1 @@
|
||||
// Code Compiler for BlitzLLVM
|
||||
// Copyright(C) 2017 Michael Fabian Dirks
|
||||
//
|
||||
// This program 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.
|
||||
//
|
||||
// This program 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 this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "ast.hpp"
|
||||
@@ -1,22 +1,6 @@
|
||||
// Code Compiler for BlitzLLVM
|
||||
// Copyright(C) 2017 Michael Fabian Dirks
|
||||
//
|
||||
// This program 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.
|
||||
//
|
||||
// This program 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 this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace BlitzLLVM {
|
||||
namespace blitz {
|
||||
namespace AST {
|
||||
class Expression {
|
||||
public:
|
||||
|
||||
@@ -1,30 +1,14 @@
|
||||
// Code Compiler for BlitzLLVM
|
||||
// Copyright(C) 2017 Michael Fabian Dirks
|
||||
//
|
||||
// This program 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.
|
||||
//
|
||||
// This program 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 this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "function.hpp"
|
||||
|
||||
BlitzLLVM::AST::ScopeExpression::ScopeExpression() {}
|
||||
blitz::AST::ScopeExpression::ScopeExpression() {}
|
||||
|
||||
BlitzLLVM::AST::ScopeExpression::~ScopeExpression() {}
|
||||
blitz::AST::ScopeExpression::~ScopeExpression() {}
|
||||
|
||||
void BlitzLLVM::AST::ScopeExpression::AddExpression(std::unique_ptr<Expression> ex) {
|
||||
void blitz::AST::ScopeExpression::AddExpression(std::unique_ptr<Expression> ex) {
|
||||
m_expressions.push_back(std::move(ex));
|
||||
}
|
||||
|
||||
BlitzLLVM::AST::FunctionExpression::FunctionExpression(ValueType returnType,
|
||||
blitz::AST::FunctionExpression::FunctionExpression(ValueType returnType,
|
||||
std::string& m_name,
|
||||
std::list<std::unique_ptr<VariableExpression>> parameters,
|
||||
std::unique_ptr<ScopeExpression> scope)
|
||||
@@ -32,11 +16,11 @@ BlitzLLVM::AST::FunctionExpression::FunctionExpression(ValueType returnType,
|
||||
|
||||
}
|
||||
|
||||
BlitzLLVM::AST::FunctionExpression::~FunctionExpression() {}
|
||||
blitz::AST::FunctionExpression::~FunctionExpression() {}
|
||||
|
||||
BlitzLLVM::AST::CallExpression::CallExpression(std::string& name, std::list<std::unique_ptr<VariableExpression>> arguments)
|
||||
blitz::AST::CallExpression::CallExpression(std::string& name, std::list<std::unique_ptr<VariableExpression>> arguments)
|
||||
: m_name(name), m_arguments(std::move(arguments)) {
|
||||
|
||||
}
|
||||
|
||||
BlitzLLVM::AST::CallExpression::~CallExpression() {}
|
||||
blitz::AST::CallExpression::~CallExpression() {}
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
// Code Compiler for BlitzLLVM
|
||||
// Copyright(C) 2017 Michael Fabian Dirks
|
||||
//
|
||||
// This program 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.
|
||||
//
|
||||
// This program 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 this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
#include "ast.hpp"
|
||||
#include "value.hpp"
|
||||
@@ -21,7 +5,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace BlitzLLVM {
|
||||
namespace blitz {
|
||||
namespace AST {
|
||||
class ScopeExpression : public Expression {
|
||||
public:
|
||||
|
||||
@@ -1,59 +1,43 @@
|
||||
// Code Compiler for BlitzLLVM
|
||||
// Copyright(C) 2017 Michael Fabian Dirks
|
||||
//
|
||||
// This program 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.
|
||||
//
|
||||
// This program 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 this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "value.hpp"
|
||||
|
||||
BlitzLLVM::AST::VariableExpression::VariableExpression(std::string& name, ValueType type /*= ValueType::Number*/)
|
||||
blitz::AST::VariableExpression::VariableExpression(std::string& name, ValueType type /*= ValueType::Number*/)
|
||||
: m_name(name), m_type(type) {}
|
||||
|
||||
BlitzLLVM::AST::VariableExpression::~VariableExpression() {}
|
||||
blitz::AST::VariableExpression::~VariableExpression() {}
|
||||
|
||||
BlitzLLVM::AST::ValueType BlitzLLVM::AST::VariableExpression::GetType() {
|
||||
blitz::AST::ValueType blitz::AST::VariableExpression::GetType() {
|
||||
return m_type;
|
||||
}
|
||||
|
||||
BlitzLLVM::AST::NumberExpression::NumberExpression(int32_t value) : value(value) {}
|
||||
blitz::AST::NumberExpression::NumberExpression(int32_t value) : value(value) {}
|
||||
|
||||
BlitzLLVM::AST::NumberExpression::~NumberExpression() {}
|
||||
blitz::AST::NumberExpression::~NumberExpression() {}
|
||||
|
||||
BlitzLLVM::AST::ValueType BlitzLLVM::AST::NumberExpression::GetType() {
|
||||
blitz::AST::ValueType blitz::AST::NumberExpression::GetType() {
|
||||
return ValueType::Number;
|
||||
}
|
||||
|
||||
BlitzLLVM::AST::DecimalExpression::DecimalExpression(float_t value) : value(value) {}
|
||||
blitz::AST::DecimalExpression::DecimalExpression(float_t value) : value(value) {}
|
||||
|
||||
BlitzLLVM::AST::DecimalExpression::~DecimalExpression() {}
|
||||
blitz::AST::DecimalExpression::~DecimalExpression() {}
|
||||
|
||||
BlitzLLVM::AST::ValueType BlitzLLVM::AST::DecimalExpression::GetType() {
|
||||
blitz::AST::ValueType blitz::AST::DecimalExpression::GetType() {
|
||||
return ValueType::Decimal;
|
||||
}
|
||||
|
||||
BlitzLLVM::AST::StringExpression::StringExpression(std::string value) : value(value) {}
|
||||
blitz::AST::StringExpression::StringExpression(std::string value) : value(value) {}
|
||||
|
||||
BlitzLLVM::AST::StringExpression::~StringExpression() {}
|
||||
blitz::AST::StringExpression::~StringExpression() {}
|
||||
|
||||
BlitzLLVM::AST::ValueType BlitzLLVM::AST::StringExpression::GetType() {
|
||||
blitz::AST::ValueType blitz::AST::StringExpression::GetType() {
|
||||
return ValueType::String;
|
||||
}
|
||||
|
||||
BlitzLLVM::AST::ConstExpression::ConstExpression(std::string& name, std::unique_ptr<ValueExpression> value)
|
||||
blitz::AST::ConstExpression::ConstExpression(std::string& name, std::unique_ptr<ValueExpression> value)
|
||||
: m_name(name), m_value(std::move(value)) {}
|
||||
|
||||
BlitzLLVM::AST::ConstExpression::~ConstExpression() {}
|
||||
blitz::AST::ConstExpression::~ConstExpression() {}
|
||||
|
||||
BlitzLLVM::AST::ValueType BlitzLLVM::AST::ConstExpression::GetType() {
|
||||
blitz::AST::ValueType blitz::AST::ConstExpression::GetType() {
|
||||
return m_value->GetType();
|
||||
}
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
// Code Compiler for BlitzLLVM
|
||||
// Copyright(C) 2017 Michael Fabian Dirks
|
||||
//
|
||||
// This program 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.
|
||||
//
|
||||
// This program 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 this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
#include "ast.hpp"
|
||||
#include "lexer.hpp"
|
||||
@@ -23,7 +7,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace BlitzLLVM {
|
||||
namespace blitz {
|
||||
namespace AST {
|
||||
enum class ValueType : int8_t {
|
||||
Unknown,
|
||||
|
||||
Reference in New Issue
Block a user