mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Move isWhitespace to a place where it makes more sense
This commit is contained in:
@@ -232,6 +232,11 @@ static struct KeywordMapping {
|
|||||||
{"OPT", T_POP_OPT}
|
{"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 */
|
#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 */
|
/* 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");
|
static_assert(LEXER_BUF_SIZE <= SSIZE_MAX, "Lexer buffer size is too large");
|
||||||
@@ -893,11 +898,6 @@ static void discardComment(void)
|
|||||||
|
|
||||||
/* Function to read a line continuation */
|
/* Function to read a line continuation */
|
||||||
|
|
||||||
static bool isWhitespace(int c)
|
|
||||||
{
|
|
||||||
return c == ' ' || c == '\t';
|
|
||||||
}
|
|
||||||
|
|
||||||
static void readLineContinuation(void)
|
static void readLineContinuation(void)
|
||||||
{
|
{
|
||||||
dbgPrint("Beginning line continuation\n");
|
dbgPrint("Beginning line continuation\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user