diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-04-25 22:22:40 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-04-25 22:22:40 +0330 |
commit | dc26ae0b913ff49ecbf0f653b4baffa7a37f2303 (patch) | |
tree | 155ab12a41b09f3852a7a7cf10f0fabf6ab467f4 /src/compiler/ast-tree.h | |
parent | 833fbb09640e46f7e8968a1a724baf25f2a219fc (diff) |
add better time printing
Diffstat (limited to 'src/compiler/ast-tree.h')
-rw-r--r-- | src/compiler/ast-tree.h | 15 |
1 files changed, 13 insertions, 2 deletions
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 <stddef.h> #include <stdint.h> #include <sys/types.h> +#include <time.h> 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, |