From dc26ae0b913ff49ecbf0f653b4baffa7a37f2303 Mon Sep 17 00:00:00 2001 From: A404M Date: Fri, 25 Apr 2025 22:22:40 +0330 Subject: add better time printing --- src/compiler/ast-tree.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/compiler/ast-tree.h') diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h index 68b8ec6..cb7c301 100644 --- a/src/compiler/ast-tree.h +++ b/src/compiler/ast-tree.h @@ -4,6 +4,7 @@ #include #include #include +#include typedef enum AstTreeToken { AST_TREE_TOKEN_FUNCTION, @@ -284,8 +285,18 @@ AstTreeVariables copyAstTreeVariables(AstTreeVariables variables, AstTreeVariables newVariables[], size_t variables_size); -AstTreeRoots makeAstTree(const char *filePath); -AstTreeRoot *getAstTreeRoot(char *filePath, AstTreeRoots *roots); +AstTreeRoots makeAstTree(const char *filePath +#ifdef PRINT_STATISTICS + , + struct timespec *lexingTime, struct timespec* parsingTime +#endif +); +AstTreeRoot *getAstTreeRoot(char *filePath, AstTreeRoots *roots +#ifdef PRINT_STATISTICS + , + struct timespec *lexingTime, struct timespec *parsingTime +#endif + ); AstTreeRoot *makeAstRoot(ParserNode *parsedRoot, char *filePath); bool pushVariable(AstTreeHelper *helper, AstTreeVariables *variables, -- cgit v1.2.3