bug fixed

fixed SIGSEGV when failed to load file in nasal_lexer::openfile
This commit is contained in:
Valk Richard Li
2021-06-06 19:17:02 +08:00
parent a0ff523229
commit a3dbaebfd8
3 changed files with 9 additions and 4 deletions

View File

@@ -53,6 +53,7 @@ void execute(std::string& file,std::string& command)
return;
}
parse.set_toklist(lexer.get_token_list());
lexer.get_token_list().clear();
parse.main_process();
if(parse.get_error())
{
@@ -65,6 +66,7 @@ void execute(std::string& file,std::string& command)
return;
}
import.link(parse.get_root());
parse.get_root().clear();
if(import.get_error())
{
die("import",file);