diff options
-rw-r--r-- | tnslc/compiler.tnsl | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tnslc/compiler.tnsl b/tnslc/compiler.tnsl index 51ed4d6..bac32ae 100644 --- a/tnslc/compiler.tnsl +++ b/tnslc/compiler.tnsl @@ -32,15 +32,17 @@ struct CompData { ;/ /; write_file(~void fd) - uint8 z = 0 - - self.hsec.push(~z) - self.dsec.push(~z) - self.csec.push(~z) + /; loop (int i = 0; i < self.hsec.num_el) [i++] + _write_byte(fd, self.hsec.get(i)) + ;/ + + /; loop (int i = 0; i < self.dsec.num_el) [i++] + _write_byte(fd, self.dsec.get(i)) + ;/ - write_to_file(fd, self.hsec.dat) - write_to_file(fd, self.dsec.dat) - write_to_file(fd, self.csec.dat) + /; loop (int i = 0; i < self.csec.num_el) [i++] + _write_byte(fd, self.csec.get(i)) + ;/ ;/ ;/ |