Skip to content

Commit 77a5030

Browse files
重构
1 parent 2100cd5 commit 77a5030

23 files changed

+63
-143
lines changed

src/identifiers/addition.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Addition function
33
* By lemonorangeapple
44
**/
5-
void addition(vector<string>::iterator it) {
5+
void addition(vector<string>::iterator it, ifstream &file) {
66
// Check if the variable is already declared
77
bool undeclared = true;
88
for (int i = 0; i <= variableCount; i++) {

src/identifiers/division.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Division function
33
* By lemonorangeapple
44
**/
5-
void division(vector<string>::iterator it) {
5+
void division(vector<string>::iterator it, ifstream &file) {
66
// Check if the variable is undeclared
77
bool undeclared = true;
88
// Loop through the variables

src/identifiers/end_if.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* End if function
33
* By lemonorangeapple
44
**/
5-
void end_if(vector<string>::iterator it) {
5+
void end_if(vector<string>::iterator it, ifstream &file) {
66
// Check if the ifFlag is empty
77
if (!ifFlag.empty()) {
88
// Pop the last element of ifFlag

src/identifiers/equal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Equal function
33
* By lemonorangeapple
44
**/
5-
void equal(vector<string>::iterator it) {
5+
void equal(vector<string>::iterator it, ifstream &file) {
66
// Check if the variable is undeclared
77
bool undeclared = true;
88
// Loop through the variables

src/identifiers/equal_or_greater.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Equal or greater function
33
* By lemonorangeapple
44
**/
5-
void equal_or_greater(vector<string>::iterator it) {
5+
void equal_or_greater(vector<string>::iterator it, ifstream &file) {
66
// Check if the variable is undeclared
77
bool undeclared = true;
88
// Loop through all the variables

src/identifiers/equal_or_less.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Equal or less function
33
* By lemonorangeapple
44
**/
5-
void equal_or_less(vector<string>::iterator it) {
5+
void equal_or_less(vector<string>::iterator it, ifstream &file) {
66
// Check if the variable is undeclared
77
bool undeclared = true;
88
// Loop through the variables

src/identifiers/greater.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Greater function
33
* By lemonorangeapple
44
**/
5-
void _greater(vector<string>::iterator it) {
5+
void _greater(vector<string>::iterator it, ifstream &file) {
66
// Check if the first variable is undeclared
77
bool undeclared = true;
88
// Loop through all variables

src/identifiers/identifiers.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// All identifiers
1+
#ifndef _IDENTIFIERS_HPP_
2+
#define _IDENTIFIERS_HPP_
3+
// Output
24
#include "output.hpp"
35
// Wrap
46
#include "wrap.hpp"
@@ -37,4 +39,5 @@
3739
// End Loop
3840
#include "end_loop.hpp"
3941
// Note
40-
#include "note.hpp"
42+
#include "note.hpp"
43+
#endif

src/identifiers/if.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* If function
33
* By lemonorangeapple
44
**/
5-
void _if(vector<string>::iterator it) {
5+
void _if(vector<string>::iterator it, ifstream &file) {
66
// Check if the variable is undeclared
77
bool undeclared = true;
88
// Loop through the variables

src/identifiers/input.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Input function
33
* By lemonorangeapple
44
**/
5-
void input(vector<string>::iterator it) {
5+
void input(vector<string>::iterator it, ifstream &file) {
66
// Check if variable is already declared
77
bool undeclared = true;
88
for (int i = 0; i <= variableCount; i++) {

0 commit comments

Comments
 (0)