Move isWhitespace to a place where it makes more sense

This commit is contained in:
ISSOtm
2020-08-23 02:09:40 +02:00
parent c952dd8a6e
commit dbef51ba05

View File

@@ -232,6 +232,11 @@ static struct KeywordMapping {
{"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");
@@ -893,11 +898,6 @@ static void discardComment(void)
/* Function to read a line continuation */
static bool isWhitespace(int c)
{
return c == ' ' || c == '\t';
}
static void readLineContinuation(void)
{
dbgPrint("Beginning line continuation\n");