Commit e58cb78 1 parent 8940ae1 commit e58cb78 Copy full SHA for e58cb78
File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 11
11
extern FILE *yyin;
12
12
int yylex (void );
13
13
void yyerror (const char *);
14
+ int yylex_destroy (void );
14
15
}
15
16
16
17
// Represents the value associated with any kind of AST node.
@@ -202,5 +203,7 @@ Node *ParseAST(std::string file_name)
202
203
}
203
204
g_root = nullptr ;
204
205
yyparse ();
206
+ fclose (yyin);
207
+ yylex_destroy ();
205
208
return g_root;
206
209
}
Original file line number Diff line number Diff line change 7
7
extern FILE *yyin;
8
8
int yylex(void);
9
9
void yyerror(const char *);
10
+ int yylex_destroy(void);
10
11
}
11
12
12
13
// Represents the value associated with any kind of AST node.
@@ -468,5 +469,7 @@ Node *ParseAST(std::string file_name)
468
469
}
469
470
g_root = nullptr;
470
471
yyparse();
472
+ fclose(yyin);
473
+ yylex_destroy();
471
474
return g_root;
472
475
}
You can’t perform that action at this time.
0 commit comments