Skip to content

Commit ef6275e

Browse files
committed
Fixs, Ajouts.
1 parent 32d30b8 commit ef6275e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "src/Parser.h"
33
#include <iostream>
44
#include <string>
5+
#include <optional>
56
#include <fstream>
67

78
int main() {
@@ -15,7 +16,6 @@ int main() {
1516
FPL::TokenBuilding t;
1617
std::vector<FPL::Token> tokens = t.parseToken(f_content);
1718
FPL::Parser parser;
18-
parser.parse(tokens);
19-
//parser.DebugPrint();
19+
parser.parse(tokens, std::nullopt);
2020
return 0;
21-
}
21+
}

src/Parser.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace FPL {
2121
public:
2222
Parser();
2323

24-
void parse(std::vector<Token> &tokens);
24+
void parse(std::vector<Token> &tokens, std::optional<std::string> argument);
2525

2626
[[maybe_unused]] void DebugPrint() const;
2727

@@ -39,7 +39,7 @@ namespace FPL {
3939
// Variable :
4040
std::map<std::string, VariableDefinition> mVariables;
4141
bool isVariable(std::string &name) const;
42-
bool VariableInstruction();
42+
bool VariableInstruction(std::optional<std::string> argument);
4343
bool ChangerInstruction();
4444

4545
// Fonctions :
@@ -53,7 +53,7 @@ namespace FPL {
5353

5454

5555
// Utils :
56-
bool ManagerInstruction();
56+
bool ManagerInstruction(std::optional<std::string> argument);
5757
std::vector<Token>::iterator mCurrentToken;
5858
std::vector<Token>::iterator mEndToken;
5959
std::map<std::string, Type> mTypes;

0 commit comments

Comments
 (0)