shithub: rgbds

Download patch

ref: dbef51ba052ff9d98fbed87f36b53e5a2d4af074
parent: c952dd8a6e1837ebfbcb5ade04f7d66cefa38cbd
author: ISSOtm <[email protected]>
date: Sat Aug 22 22:09:40 EDT 2020

Move `isWhitespace` to a place where it makes more sense

--- a/src/asm/lexer.c
+++ b/src/asm/lexer.c
@@ -232,6 +232,11 @@
 	{"OPT", T_POP_OPT}
 };
 
+static bool isWhitespace(int c)
+{
+	return c == ' ' || c == '\t';
+}
+
 #define LEXER_BUF_SIZE 42 /* TODO: determine a sane value for this */
 /* This caps the size of buffer reads, and according to POSIX, passing more than SSIZE_MAX is UB */
 static_assert(LEXER_BUF_SIZE <= SSIZE_MAX, "Lexer buffer size is too large");
@@ -892,11 +897,6 @@
 }
 
 /* Function to read a line continuation */
-
-static bool isWhitespace(int c)
-{
-	return c == ' ' || c == '\t';
-}
 
 static void readLineContinuation(void)
 {