X-Git-Url: https://ocean-lang.org/code/?a=blobdiff_plain;f=csrc%2Fscanner.mdc;h=b57db29c0b38fcefead7e0cc4cafb41494d1264e;hb=74275b2e557383a028515ca4dacdf07cb4858aa1;hp=777688482566796691d97f6df6cd3e8e5cf9e863;hpb=fcd83db1af72cf3da045ca85e89e4d9b119be651;p=ocean diff --git a/csrc/scanner.mdc b/csrc/scanner.mdc index 7776884..b57db29 100644 --- a/csrc/scanner.mdc +++ b/csrc/scanner.mdc @@ -882,11 +882,6 @@ tokens will continue to return the same end-of-file token. ###### white space if (ch == WEOF) { - if (state->col) { - state->col = 0; - state->check_indent = 1; - continue; - } tk.num = TK_eof; return tk; } @@ -1005,12 +1000,12 @@ a flag that tells us whether or not we need to strip. &mbstate); if (n == -2 || n == 0) { /* Not enough bytes - not really possible */ - next = '\n'; - state->offset = state->node->code.len; + next = '\n'; // NOTEST + state->offset = state->node->code.len; // NOTEST } else if (n == -1) { /* error */ - state->offset += 1; - next = 0x7f; // an illegal character + state->offset += 1; // NOTEST + next = 0x7f; // an illegal character // NOTEST } else state->offset += n; @@ -1675,7 +1670,7 @@ Number parsing goes in `libnumber.c` ## number includes ## number functions -###### File: number.h +###### File: parse_number.h int number_parse(mpq_t num, char tail[3], struct text tok); ###### File: scanner.mk @@ -1959,7 +1954,7 @@ String parsing goes in `libstring.c` ## string functions ## string main -###### File: string.h +###### File: parse_string.h int string_parse(struct token *tok, char escape, struct text *str, char tail[3]); @@ -1988,8 +1983,8 @@ the tokens one per line. #include #include "mdcode.h" #include "scanner.h" - #include "number.h" - #include "string.h" + #include "parse_number.h" + #include "parse_string.h" static int errs; static void pr_err(char *msg)