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 <llvm/IR/IRBuilder.h>
5#include <stack>
7#include "parser/Node.h"
8
9namespace unlogic
10{
12 {
14 llvm::IRBuilder<> builder;
15 std::stack<llvm::Value *> values;
16
17 llvm::Value *operator()(std::monostate &node);
18 llvm::Value *operator()(NumericLiteralNode &node);
19 llvm::Value *operator()(StringLiteralNode &node);
20 llvm::Value *operator()(DivisionNode &node);
21 llvm::Value *operator()(ScopedBlockNode &node);
22 llvm::Value *operator()(VariableNode &node);
23 llvm::Value *operator()(CallNode &node);
24 llvm::Value *operator()(AdditionNode &node);
25 llvm::Value *operator()(SubtractionNode &node);
26 llvm::Value *operator()(MultiplicationNode &node);
27 llvm::Value *operator()(PotentiationNode &node);
28 llvm::Value *operator()(FunctionDefinitionNode &node);
29 llvm::Value *operator()(PlotCommandNode &node);
30 llvm::Value *operator()(ProgramEntryNode &node);
31
33 };
34} // namespace unlogic
35
36#endif // UNLOGIC_IRGENERATOR_H
IRGenerator(IRGenerationContext &ctx)
Definition IRGenerator.h:32
IRGenerationContext & ctx
Definition IRGenerator.h:13
llvm::IRBuilder builder
Definition IRGenerator.h:14
llvm::Value * operator()(std::monostate &node)
std::stack< llvm::Value * > values
Definition IRGenerator.h:15