Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on VS2019 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
################################################################################
# Ce fichier .gitignore a été automatiquement créé par Microsoft(R) Visual Studio.
################################################################################

/x64/Debug
/.vs/rpg/v16
/CMakeFiles/3.15.2
/CMakeFiles
/rpg.dir/Debug/rpg.tlog
/rpg.dir/Debug
/cmake_install.cmake
/CMakeCache.txt
/ALL_BUILD.vcxproj.user
/ALL_BUILD.vcxproj.filters
/ALL_BUILD.vcxproj
/ZERO_CHECK.vcxproj.filters
/ZERO_CHECK.vcxproj
/rpg.vcxproj.user
/rpg.vcxproj.filters
/rpg.vcxproj
/rpg.sln
4 changes: 2 additions & 2 deletions src/rpg/ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Node {
const std::string &getValue() const { return _token.getValue(); }
virtual std::string toString() { return _token.toString(); }

int addNode(std::shared_ptr<Node> node) { nodes.push_back(node); }
int addNode(std::shared_ptr<Node> node) { nodes.push_back(node); return nodes.size(); }

const std::vector<std::shared_ptr<Node>> &getNodes() const { return nodes; }

Expand All @@ -107,7 +107,7 @@ class Expression : public Node {
public:
Expression(int line, const Token &token) : Node(line, token) {}

llvm::Value *accept(Generator *v, void *param = nullptr) override { }
llvm::Value *accept(Generator *v, void *param = nullptr) override { return nullptr; }

};

Expand Down
3 changes: 3 additions & 0 deletions src/rpg/generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ llvm::Value* GeneratorLLVM::visit(SelectStatement *select,void *param) {
/* Emits the ENDSL block */
selectBlock->getBasicBlockList().push_back(selectEnd);
builder->SetInsertPoint(selectEnd);

return nullptr;
}

/**
Expand Down Expand Up @@ -509,6 +511,7 @@ llvm::Value *GeneratorLLVM::visit(ForStatement *loop,void *param) {
/* Restore the insert point the end of the loop */
builder->SetInsertPoint(exitLoop);

return nullptr;
}

llvm::Value *GeneratorLLVM::visit(DisplayStatement *dsply,void *param) {
Expand Down