hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
moduleContext.cpp
Go to the documentation of this file.
1//
2// Created by XIaokang00010 on 2024/9/4.
3//
4
5#include "moduleContext.h"
6
7#include <utility>
8
9namespace yoi {
10
11 moduleContext::moduleContext(std::shared_ptr<yoi::compilerContext> compilerContext, yoi::wstr path,
12 yoi::hoshiModule *moduleAST) : compilerContext(std::move(compilerContext)), path(std::move(path)), moduleAST(moduleAST) {
13 }
14
18
22
24 IRBuilderStack.push(builder);
25 }
26
30
31 std::shared_ptr<yoi::compilerContext> moduleContext::getCompilerContext() {
32 return compilerContext;
33 }
34
36 templateBuilders.push_back(builder);
37 }
38
42
43 std::vector<IRTemplateBuilder> &moduleContext::getTemplateBuilders() {
44 return templateBuilders;
45 }
46} // namespace yoi
yoi::IRBuilder & getIRBuilder()
std::vector< IRTemplateBuilder > templateBuilders
std::stack< yoi::IRBuilder > IRBuilderStack
void pushIRBuilder(const yoi::IRBuilder &builder)
yoi::hoshiModule & getModuleAST()
void pushTemplateBuilder(IRTemplateBuilder &builder)
std::shared_ptr< yoi::compilerContext > compilerContext
std::vector< IRTemplateBuilder > & getTemplateBuilders()
moduleContext(std::shared_ptr< yoi::compilerContext > compilerContext, yoi::wstr path, yoi::hoshiModule *moduleAST)
std::shared_ptr< yoi::compilerContext > getCompilerContext()
yoi::hoshiModule * moduleAST
std::wstring wstr
Definition def.hpp:48