diff options
Diffstat (limited to 'src/compiler/parser.c')
-rw-r--r-- | src/compiler/parser.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |