Skip to content

Commit

Permalink
Update source.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
letter-aa committed Nov 23, 2023
1 parent 421eecb commit 9494f1b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,29 @@ void compile(string input, string data, int & i) {
}
bool bc = boolcomp(input, data, b);
if (bc == false) {
int prei = i;
bool ifcomplete = false;
vector<string> vs;
stringX::splitString(input, vs, "\n");
if (vs.size() > 1) {
while (prei < vs.size()) {
++prei;
rs(vs[prei]);
if (vs[prei] == "end") {
ifcomplete = true;
break;
}
}
if (ifcomplete == false) {
error("if statement was not closed!", input, data, data, false);
}
while (i < vs.size()) {
++i;
if (vs[i] == "end") {
break;
}
}
}
return;
}
if (bc == true) {
Expand Down

0 comments on commit 9494f1b

Please sign in to comment.