aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lexer.c8
-rw-r--r--src/parser.c20
2 files changed, 15 insertions, 13 deletions
diff --git a/src/lexer.c b/src/lexer.c
index 400d1e4..790d7bf 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -13,8 +13,12 @@
#include "lexer.h"
#include "unicode.h"
-#define LEXEMES_DFLT_CAP (2048)
-#define SIZE_WDTH (sizeof(size_t) * CHAR_BIT)
+#if DEBUG
+# define LEXEMES_DFLT_CAP (8)
+#else
+# define LEXEMES_DFLT_CAP (2048)
+#endif
+#define SIZE_WDTH (sizeof(size_t) * CHAR_BIT)
static bool skip_comment(const uchar **, const uchar *);
diff --git a/src/parser.c b/src/parser.c
index a1028aa..6273fd7 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -11,17 +11,15 @@
#include "errors.h"
#include "parser.h"
-/* #define AST_DFLT_CAP (2048) */
-#define AST_DFLT_CAP (8)
-#define SIZE_WDTH (sizeof(size_t) * CHAR_BIT)
-
-typedef idx_t_ parsefn(struct ast *, struct lexemes);
-static parsefn parseblk,
- parsedecl,
- parseexpr,
- parseproto,
- parsestmt,
- parsetype;
+#if DEBUG
+# define AST_DFLT_CAP (8)
+#else
+# define AST_DFLT_CAP (2048)
+#endif
+#define SIZE_WDTH (sizeof(size_t) * CHAR_BIT)
+
+typedef idx_t_ parsefn(struct ast *, struct lexemes) __attribute__((nonnull));
+static parsefn parseblk, parsedecl, parseexpr, parseproto, parsestmt, parsetype;
static struct ast mkast(void);
static idx_t_ astalloc(struct ast *) __attribute__((nonnull));