This repository has been archived by the owner on May 17, 2024. It is now read-only.
forked from Feelzor/InterpreteurCpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Feelzor#27 from FeelZoR/feature-demo
Feature demo
- Loading branch information
Showing
41 changed files
with
749 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "Procedure.h" | ||
|
||
Procedure::Procedure(TableSymboles table, Noeud* sequence, std::vector<SymboleValue*> parametres) | ||
: m_table(table), m_sequence(sequence), m_params(parametres) {} | ||
|
||
void Procedure::accepter(Visiteur& visiteur) { | ||
m_sequence->accepter(visiteur); | ||
} | ||
|
||
void Procedure::empiler(std::vector<Valeur*> parametres) { | ||
for (int i = 0; i < parametres.size() && i < m_params.size(); i++) { | ||
m_params[i]->setValeur(parametres[i]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef PROCEDURE_H | ||
#define PROCEDURE_H | ||
|
||
#include "ArbreAbstrait.h" | ||
#include "TableSymboles.h" | ||
#include "SymboleValue.h" | ||
#include <vector> | ||
|
||
class Procedure : public Noeud { | ||
public: | ||
Procedure(TableSymboles table, Noeud* sequence, std::vector<SymboleValue*> parametres); | ||
void accepter(Visiteur& visiteur) override; | ||
void empiler(std::vector<Valeur*> parametres); | ||
private: | ||
TableSymboles m_table; | ||
Noeud* m_sequence; | ||
std::vector<SymboleValue*> m_params; | ||
}; | ||
|
||
#endif /* PROCEDURE_H */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.