shithub: rgbds

Download patch

ref: ac011fe69f009152eb3bc87707d6140620995547
parent: 9e3d7a50e6a93152f60872dd03080c2c1942a97e
author: ISSOtm <eldredhabert0@gmail.com>
date: Tue Aug 18 12:49:21 EDT 2020

Use common function to discard comments in macro args

--- a/src/asm/lexer.c
+++ b/src/asm/lexer.c
@@ -1667,10 +1667,8 @@
 		case ';': /* Comments inside macro args */
 			if (insideString)
 				break;
-			do {
-				shiftChars(1);
-				c = peek(0);
-			} while (c != EOF && c != '\r' && c != '\n');
+			discardComment();
+			c = peek(0);
 			/* fallthrough */
 		case ',':
 		case '\r':