Skip to content

Commit ee5faf7

Browse files
committed
Functions Management
1 parent 5ebfb5d commit ee5faf7

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

src/FonctionDefinition.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "FonctionDefinition.h"
2+
3+
namespace FPL {
4+
void FonctionDefinition::FDebugPrint() const {
5+
std::cout << FonctionName << "(" << std::endl;
6+
for (ArgumentDefinition arg : ArgsFonction) {
7+
arg.ADebugPrint();
8+
}
9+
std::cout << ")\n" << std::endl;
10+
}
11+
12+
void ArgumentDefinition::ADebugPrint() const {
13+
std::cout << ArgName << "->" << ArgType.mName << ", " << std::endl;
14+
}
15+
}

src/FonctionDefinition.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#pragma once
2+
3+
#include <iostream>
4+
#include <string>
5+
#include <vector>
6+
#include "TypeManager.h"
7+
8+
namespace FPL {
9+
class ArgumentDefinition {
10+
public:
11+
std::string ArgName;
12+
Type ArgType;
13+
14+
void ADebugPrint() const;
15+
};
16+
17+
class FonctionDefinition {
18+
public:
19+
std::string FonctionName;
20+
std::vector<ArgumentDefinition> ArgsFonction;
21+
std::vector<std::string> FonctionContent;
22+
23+
void FDebugPrint() const;
24+
};
25+
}

0 commit comments

Comments
 (0)