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>
7#include "parser/Node.h"
8
9namespace unlogic
10{
12 {
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
IRGenerator(IRGenerationContext &ctx)
Definition IRGenerator.h:31
IRGenerationContext & ctx
Definition IRGenerator.h:13
city::Value * operator()(std::monostate &node)
city::IRBuilder builder
Definition IRGenerator.h:14