- FILE *fp = fopen(ifile, "r");
- if (!fp) {
- fclose(fp);
- return error(ERROR_COMPILER, "Source file: %s not found\n", ifile);
- } else {
- struct lex_file *lex = lex_open(fp);
- if (!lex) {
- fclose(fp);
- return 0;
- }
- parse_tree(lex);
- lex_close (lex);
- }