unlogic
Loading...
Searching...
No Matches
IRGenerator.h
Go to the documentation of this file.
1
#ifndef UNLOGIC_IRGENERATOR_H
2
#define UNLOGIC_IRGENERATOR_H
3
4
#include <city/ir/IRBuilder.h>
5
#include <city/ir/IRModule.h>
6
#include "
IRGenerationContext.h
"
7
#include "
parser/Node.h
"
8
9
namespace
unlogic
10
{
11
struct
IRGenerator
12
{
13
IRGenerationContext
&
ctx
;
14
city::IRBuilder
builder
;
15
16
city::Value *
operator()
(std::monostate &node);
17
city::Value *
operator()
(
NumericLiteralNode
&node);
18
city::Value *
operator()
(
StringLiteralNode
&node);
19
city::Value *
operator()
(
DivisionNode
&node);
20
city::Value *
operator()
(
ScopedBlockNode
&node);
21
city::Value *
operator()
(
VariableNode
&node);
22
city::Value *
operator()
(
CallNode
&node);
23
city::Value *
operator()
(
AdditionNode
&node);
24
city::Value *
operator()
(
SubtractionNode
&node);
25
city::Value *
operator()
(
MultiplicationNode
&node);
26
city::Value *
operator()
(
PotentiationNode
&node);
27
city::Value *
operator()
(
FunctionDefinitionNode
&node);
28
city::Value *
operator()
(
PlotCommandNode
&node);
29
city::Value *
operator()
(
ProgramEntryNode
&node);
30
31
IRGenerator
(
IRGenerationContext
&
ctx
) :
ctx
(
ctx
),
builder
(
ctx
.module.CreateBuilder()) {}
32
};
33
}
// namespace unlogic
34
35
#endif
// UNLOGIC_IRGENERATOR_H
IRGenerationContext.h
Node.h
unlogic
Definition
Compiler.h:14
unlogic::AdditionNode
Definition
Node.h:80
unlogic::CallNode
Definition
Node.h:63
unlogic::DivisionNode
Definition
Node.h:98
unlogic::FunctionDefinitionNode
Definition
Node.h:110
unlogic::IRGenerationContext
Definition
IRGenerationContext.h:9
unlogic::IRGenerator
Definition
IRGenerator.h:12
unlogic::IRGenerator::IRGenerator
IRGenerator(IRGenerationContext &ctx)
Definition
IRGenerator.h:31
unlogic::IRGenerator::ctx
IRGenerationContext & ctx
Definition
IRGenerator.h:13
unlogic::IRGenerator::operator()
city::Value * operator()(std::monostate &node)
Definition
IRGenerator.cpp:151
unlogic::IRGenerator::builder
city::IRBuilder builder
Definition
IRGenerator.h:14
unlogic::MultiplicationNode
Definition
Node.h:92
unlogic::NumericLiteralNode
Definition
Node.h:43
unlogic::PlotCommandNode
Definition
Node.h:121
unlogic::PotentiationNode
Definition
Node.h:104
unlogic::ProgramEntryNode
Definition
Node.h:137
unlogic::ScopedBlockNode
Definition
Node.h:129
unlogic::StringLiteralNode
Definition
Node.h:49
unlogic::SubtractionNode
Definition
Node.h:86
unlogic::VariableNode
Definition
Node.h:55
unlogic
src
compiler
transformer
IRGenerator.h
Generated by
1.9.8