diff options
Diffstat (limited to 'tnslc/utils')
-rw-r--r-- | tnslc/utils/iterator.tnsl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tnslc/utils/iterator.tnsl b/tnslc/utils/iterator.tnsl index b38d71f..c797017 100644 --- a/tnslc/utils/iterator.tnsl +++ b/tnslc/utils/iterator.tnsl @@ -19,10 +19,22 @@ struct Iterator { ;/ ;/ + /; at_end [bool] + return (self.pos + 1) !< (self.v`.count) + ;/ + /; prev /; if (self.pos > 0) self.pos-- ;/ ;/ + + /; get_pos [int] + return self.pos + ;/ + + /; set_pos (int p) + self.pos = p + ;/ ;/ |