Move fatal from lexer.c to parser.c, rename it to parser_fatal, replace calls from main.c to parser_fatal with calls to jerry_Exit.

This commit is contained in:
Ruben Ayrapetyan
2014-07-10 22:06:09 +04:00
parent e6b3be5dfc
commit 6a27068dbd
5 changed files with 38 additions and 39 deletions
+4 -4
View File
@@ -108,14 +108,14 @@ main (int argc, char **argv)
else if (file_name == NULL)
file_name = argv[i];
else
fatal (ERR_SEVERAL_FILES);
jerry_Exit (ERR_SEVERAL_FILES);
}
if (file_name == NULL)
fatal (ERR_NO_FILES);
jerry_Exit (ERR_NO_FILES);
if (dump_tokens && dump_ast)
fatal (ERR_SEVERAL_FILES);
jerry_Exit (ERR_SEVERAL_FILES);
if (!dump_tokens)
dump_ast = true;
@@ -125,7 +125,7 @@ main (int argc, char **argv)
if (file == NULL)
{
fatal (ERR_IO);
jerry_Exit (ERR_IO);
}
lexer_set_file (file);