Files
BlitzLLVM/code_compiler/source/ast/function.cpp
T

30 lines
1000 B
C++
Raw Normal View History

2024-06-25 18:59:15 +02:00
/// AUTOGENERATED COPYRIGHT HEADER START
// Copyright (C) 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
// AUTOGENERATED COPYRIGHT HEADER END
2024-06-06 13:37:13 +02:00
#include "function.hpp"
2024-06-25 18:59:15 +02:00
blitz::ast::ScopeExpression::ScopeExpression() {}
2024-06-06 13:37:13 +02:00
2024-06-25 18:59:15 +02:00
blitz::ast::ScopeExpression::~ScopeExpression() {}
2024-06-06 13:37:13 +02:00
2024-06-25 18:59:15 +02:00
void blitz::ast::ScopeExpression::AddExpression(std::unique_ptr<expression> ex) {
2024-06-06 13:37:13 +02:00
m_expressions.push_back(std::move(ex));
}
2024-06-25 18:59:15 +02:00
blitz::ast::FunctionExpression::FunctionExpression(ValueType returnType,
2024-06-06 13:37:13 +02:00
std::string& m_name,
std::list<std::unique_ptr<VariableExpression>> parameters,
std::unique_ptr<ScopeExpression> scope)
: m_returnType(returnType), m_name(m_name), m_parameters(std::move(parameters)), m_content(std::move(scope)) {
}
2024-06-25 18:59:15 +02:00
blitz::ast::FunctionExpression::~FunctionExpression() {}
2024-06-06 13:37:13 +02:00
2024-06-25 18:59:15 +02:00
blitz::ast::CallExpression::CallExpression(std::string& name, std::list<std::unique_ptr<VariableExpression>> arguments)
2024-06-06 13:37:13 +02:00
: m_name(name), m_arguments(std::move(arguments)) {
}
2024-06-25 18:59:15 +02:00
blitz::ast::CallExpression::~CallExpression() {}