summaryrefslogtreecommitdiff
path: root/src/compiler/parser.h
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-25 22:22:40 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-25 22:22:40 +0330
commitdc26ae0b913ff49ecbf0f653b4baffa7a37f2303 (patch)
tree155ab12a41b09f3852a7a7cf10f0fabf6ab467f4 /src/compiler/parser.h
parent833fbb09640e46f7e8968a1a724baf25f2a219fc (diff)
add better time printing
Diffstat (limited to 'src/compiler/parser.h')
-rw-r--r--src/compiler/parser.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/parser.h b/src/compiler/parser.h
index 0ee59a6..f37715d 100644
--- a/src/compiler/parser.h
+++ b/src/compiler/parser.h
@@ -4,6 +4,7 @@
#include "utils/type.h"
#include <stddef.h>
#include <stdint.h>
+#include <time.h>
typedef enum ParserToken {
PARSER_TOKEN_ROOT,
@@ -178,7 +179,12 @@ void parserNodePrint(const ParserNode *node, int indent);
#endif
void parserNodeDelete(ParserNode *node);
-ParserNode *parserFromPath(const char *filePath);
+ParserNode *parserFromPath(const char *filePath
+#ifdef PRINT_STATISTICS
+ ,
+ struct timespec *lexingTime
+#endif
+);
ParserNode *parser(LexerNodeArray lexed);
bool parserNodeArray(LexerNode *begin, LexerNode *end, ParserNode *parent);
@@ -240,4 +246,4 @@ bool isExpression(ParserNode *node);
bool isType(ParserNode *node);
bool isValue(ParserNode *node);
-char escapeChar(char *begin,char *end, bool *success);
+char escapeChar(char *begin, char *end, bool *success);