From d05a4fcd14a4369a80a145379e8b902d83e5f916 Mon Sep 17 00:00:00 2001 From: "Ben L. Titzer" Date: Wed, 28 Jun 2023 12:31:17 -0400 Subject: [PATCH] [lib/util] Add DataReader.atLimit() method --- lib/util/DataReader.v3 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/util/DataReader.v3 b/lib/util/DataReader.v3 index 14e6dcd47..d6d3da035 100644 --- a/lib/util/DataReader.v3 +++ b/lib/util/DataReader.v3 @@ -44,6 +44,10 @@ class DataReader { def at(npos: int) -> this { pos = npos; } + // set the current position + def atLimit() -> this { + pos = limit; + } // set the current position and limit def atl(npos: int, nlimit: int) -> this { pos = npos;