Skip to content

Commit

Permalink
empty strings do not have en EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
sillydan1 committed Mar 20, 2022
1 parent 98b2865 commit bc3d15c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/parser/driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ driver::driver(const symbol_table_t& map) : trace_parsing (false), trace_scannin
}

int driver::parse(const std::string &f) {
if(f.empty())
return 0;
file = f;
location.initialize (&file);
scan_begin();
Expand Down

0 comments on commit bc3d15c

Please sign in to comment.