Skip to content

Commit 33e18fa

Browse files
committed
Opti, Tests, Fixs.
1 parent 51f6e43 commit 33e18fa

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Parser.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ namespace FPL {
169169
std::cerr << "Vous ne pouvez plus rajouter d'instruction ou autre apres l'instruction 'renvoyer'." << std::endl;
170170
exit(1);
171171
}
172-
173172
break;
174173
} else {
175174
std::cerr << "Vous devez utiliser la ';' pour mettre fin a l'instruction." << std::endl;
@@ -573,7 +572,7 @@ namespace FPL {
573572
return false;
574573
}
575574

576-
bool Parser::executeInputs(std::optional<FonctionDefinition>& fonction, std::string& VarName, Type& VarType, std::string option) {
575+
bool Parser::executeInputs(std::optional<FonctionDefinition>& fonction, std::string& VarName, Type& VarType, const std::string& option) {
577576
if (option == "with") {
578577
auto VarValue = CheckerValue();
579578

src/Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace FPL {
3939
// Variable :
4040
std::map<std::string, VariableDefinition> mVariables;
4141
bool isVariable(std::string &name) const;
42-
bool executeInputs(std::optional<FonctionDefinition> &fonction, std::string& VarName, Type& VarType, std::string option);
42+
bool executeInputs(std::optional<FonctionDefinition> &fonction, std::string& VarName, Type& VarType, const std::string& option);
4343
void ManageVariableName(std::optional<FonctionDefinition> &fonction, std::string name);
4444
void DefineVariable(std::optional<FonctionDefinition>& fonction, std::string& VarName, Type& VarType, std::string& VarValue, std::optional<Statement>& ContentVarValue, bool isGlobal, bool HasReturnV);
4545
bool VariableInstruction(std::optional<FonctionDefinition>& fonction);

0 commit comments

Comments
 (0)