From 6e86f7b9a3ca057640bcfaa4ea72872dcd8d3af4 Mon Sep 17 00:00:00 2001 From: A404M Date: Fri, 6 Jun 2025 03:19:06 +0330 Subject: fix when you disable statistics some more clean up --- src/compiler/parser.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/compiler/parser.c') diff --git a/src/compiler/parser.c b/src/compiler/parser.c index d5906a5..a35800c 100644 --- a/src/compiler/parser.c +++ b/src/compiler/parser.c @@ -811,7 +811,9 @@ ParserNode *parserFromPath(const char *filePath Time *lexingTime #endif ) { +#ifdef PRINT_STATISTICS Time start = get_time(); +#endif char *code = readWholeFile(filePath); if (code == NULL) { return NULL; @@ -821,8 +823,10 @@ ParserNode *parserFromPath(const char *filePath if (lexerNodeArrayIsError(lexed)) { return NULL; } +#ifdef PRINT_STATISTICS Time end = get_time(); *lexingTime = time_add(*lexingTime, time_diff(end, start)); +#endif ParserNode *root = parser(lexed); lexerNodeArrayDestroy(lexed); -- cgit v1.2.3