aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/lexer.h2
-rw-r--r--src/include/util.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/include/lexer.h b/src/include/lexer.h
index 5235f3b..79a3cb6 100644
--- a/src/include/lexer.h
+++ b/src/include/lexer.h
@@ -53,7 +53,7 @@ void lexer_add_current_char(lexer_t* lexer, int type);
Add first character of given lexer's `src` to the value of the last token in `tokenl`, if it exists.
Otherwise, create new token and add it.
*/
-void lexer_add_current_char_to_last_token(lexer_t* lexer, int type);
+void lexer_add_current_char_to_last_token(lexer_t* lexer, token_type_t type);
/* Handle regular state. */
void lexer_do_reg(lexer_t* lexer);
diff --git a/src/include/util.h b/src/include/util.h
index 839d3e4..9f8a2b0 100644
--- a/src/include/util.h
+++ b/src/include/util.h
@@ -6,6 +6,13 @@
#include <string.h>
#include <stdio.h>
+#define MIN(a, b) (a < b ? a : b)
+#define MAX(a, b) (a > b ? a : b)
+
+/*
+ TODO: Make these macros, to allow for better logging (printing __FILE__,
+ __func__, etc.)
+*/
/* Log some debug information. */
void log_dbg(const char*, ...);
/* c: */