diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2023-08-31 01:00:44 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2023-08-31 01:00:44 -0400 |
commit | 3bfdbd26958e3b8193500dd5fad8dcd58c5a8457 (patch) | |
tree | 59329ed9c362afc504d20f38a51e95bf93704202 /tnslc/tokenizer.tnsl | |
parent | 346bc784bedcd00ca8037b5c5a4194c0af9757fb (diff) |
Updates to include new c_wrap
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 ;/ |