hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 61b346df663cac76481f46041a86a099a83e76a9
parent 3a95dcd8b12844f0720b3a1818cbfd7a1c272db4
Author: Byron Torres <b@torresjrjr.com>
Date:   Tue,  1 Feb 2022 11:56:51 +0000

s/build()/finish()

Signed-off-by: Byron Torres <b@torresjrjr.com>

Diffstat:
Mdatetime/datetime.ha | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/datetime/datetime.ha b/datetime/datetime.ha @@ -197,7 +197,7 @@ export fn from_moment(m: chrono::moment) datetime = { export fn from_str(layout: str, s: str) (datetime | insufficient | errors::invalid) = { const b = newmock(); parse(&b, layout, s)?; - return build(&b)?; + return finish(&b)?; }; // Creates a [[chrono::moment]] from a [[datetime]] @@ -215,13 +215,13 @@ export type insufficient = !void; // Constructs a new datetime. Start with [[newmock]]. Collect enough datetime // information incrementally by direct field assignments or multiple calls to -// [[parse]]. Finish with [[build]]. +// [[parse]]. Finish with [[finish]]. // // let mock = datetime::newmock(); // datetime::parse(&mock, "Year: %Y", "Year: 2038"); // datetime::parse(&mock, "Month: %m", "Month: 01"); // mock.day = 19; -// let dt = datetime::build(&mock, datetime::strategy::YMD); +// let dt = datetime::finish(&mock, datetime::strategy::YMD); // export type mock = datetime; @@ -231,7 +231,7 @@ export fn newmock() mock = init(): mock; // Returns a datetime from a mock. The provided [[strategy]]s will be tried in // order until a valid datetime is produced, or fail otherwise. The default // strategy is [[strategy::ALL]]. -export fn build(f: *mock, m: strategy...) (datetime | insufficient | errors::invalid) = { +export fn finish(f: *mock, m: strategy...) (datetime | insufficient | errors::invalid) = { if (len(m) == 0) { m = [strategy::ALL]; };