Skip to content

Commit

Permalink
Update parse.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
silas-wr authored Jul 23, 2024
1 parent 61b2e26 commit 8f81f65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/crate/parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Program parse(vector<Token> tlist) {
} else if (load_type == "pack") {
load_var.push_back(tok);
load_type = "packid";
} else if (find(id.begin(), id.end(), load_type) != -1) {
} else if (find(id.begin(), id.end(), load_type)) {
load_var.clear();
load_type = "";
cout << "[" << tok.row << ", " << tok.col << "] unexpected id. (unexpected-id-with-" << load_type << ")\n";
Expand All @@ -70,7 +70,7 @@ Program parse(vector<Token> tlist) {
} else if (load_type == "pack") {
load_var.push_back(tok);
load_type = "packct";
} else if (find(id.begin(), id.end(), load_type) != -1) {
} else if (find(id.begin(), id.end(), load_type)) {
load_var.clear();
load_type = "";
cout << "[" << tok.row << ", " << tok.col << "] unexpected const. (unexpected-const-with-" << load_type << ")\n";
Expand All @@ -85,7 +85,7 @@ Program parse(vector<Token> tlist) {
if (load_type == "") {
load_var.push_back(tok);
load_type = "import";
} else if (find(sky.begin(), sky.end(), load_type) != -1) {
} else if (find(sky.begin(), sky.end(), load_type)) {
load_var.clear();
load_type = "";
cout << "[" << tok.row << ", " << tok.col << "] unexpected import. (unexpected-import-with-" << load_type << ")\n";
Expand All @@ -100,7 +100,7 @@ Program parse(vector<Token> tlist) {
if (load_type == "") {
load_var.push_back(tok);
load_type = "pack";
} else if (find(sky.begin(), sky.end(), load_type) != -1) {
} else if (find(sky.begin(), sky.end(), load_type)) {
load_var.clear();
load_type = "";
cout << "[" << tok.row << ", " << tok.col << "] unexpected package. (unexpected-pack-with-" << load_type << ")\n";
Expand Down

0 comments on commit 8f81f65

Please sign in to comment.