skip empty lines in OpenFPGA shell

This commit is contained in:
tangxifan 2020-06-25 10:18:05 -06:00
parent db5397fa75
commit e2d3ac78ec
1 changed files with 5 additions and 0 deletions

View File

@ -296,6 +296,11 @@ void Shell<T>::run_script_mode(const char* script_file_name, T& context) {
/* Read line by line */
while (getline(fp, line)) {
/* Skip empty line */
if (true == line.empty()) {
continue;
}
/* If the line that starts with '#', it is commented, we can skip */
if ('#' == line.front()) {
continue;