shithub: rgbds

Download patch

ref: cf2001de5fd542b4605d14f249f3aa7c6159ada5
parent: 6d00877231196cd2c9f903f660613b3e61516c03
author: ISSOtm <[email protected]>
date: Tue Feb 18 19:01:51 EST 2020

Allow compiling parser in debug mode with `-DYYDEBUG=1`

--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -44,7 +44,9 @@
 bool skipElif;
 uint32_t unionStart[128], unionSize[128];
 
-/* extern int yydebug; */
+#if defined(YYDEBUG) && YYDEBUG
+extern int yydebug;
+#endif
 
 FILE *dependfile;
 bool oGeneratedMissingIncludes;
@@ -335,7 +337,9 @@
 	if (!cldefines)
 		fatalerror("No memory for command line defines");
 
-	/* yydebug=1; */
+#if defined(YYDEBUG) && YYDEBUG
+	yydebug = 1;
+#endif
 
 	nMaxRecursionDepth = 64;
 	oGeneratePhonyDeps = false;