diff options
Diffstat (limited to 'tnslc/tokenizer.tnsl')
-rw-r--r-- | tnslc/tokenizer.tnsl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tnslc/tokenizer.tnsl b/tnslc/tokenizer.tnsl index 09509f8..7a15ade 100644 --- a/tnslc/tokenizer.tnsl +++ b/tnslc/tokenizer.tnsl @@ -193,7 +193,7 @@ struct Token { uint8 buf = 0 int read_count = 0 /; loop - _read_byte(file_in, ~buf, ~read_count) + read_count = _read_byte(file_in, ~buf) /; if (buf == '\n' || read_count == 0) break ;/ @@ -209,7 +209,7 @@ struct Token { read_count = 0 /; loop - _read_byte(file_in, ~buf, ~read_count) + read_count = _read_byte(file_in, ~buf) /; if (read_count == 0) break @@ -217,10 +217,11 @@ struct Token { /; if (buf == '\\') tmp.append(buf) - read_count = 0 - _read_byte(file_in, ~buf, ~read_count) + read_count = _read_byte(file_in, ~buf) column`++ - tmp.append(buf) + /; if (read_count !== 0) + tmp.append(buf) + ;/ ;; else if (buf == first) tmp.append(buf) break @@ -261,7 +262,7 @@ struct Token { # Read loop. /; loop [column++] - _read_byte(file_in, ~buf, ~read_count) + read_count = _read_byte(file_in, ~buf) /; if (read_count == 0) break ;/ |