hare

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

commit 95d45f47befb5dc80d159ed9a0cf246bd5568503
parent abbddbb92bc983a79d9f23396d6cff90e1f5ceba
Author: Sebastian <sebastian@sebsite.pw>
Date:   Tue, 17 Oct 2023 21:07:29 -0400

Revert "time::date: move def to global scope"

Now that hare::parse supports local def

This reverts commit 11adbdad89732418fa559fd643bba50f9340a801.

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mtime/date/error.ha | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/time/date/error.ha b/time/date/error.ha @@ -6,8 +6,6 @@ use fmt; // All possible errors returned from [[date]]. export type error = !(insufficient | invalid | parsefail); -def FMTMSG = "Invalid date format for specifier '{}'"; - // Converts an [[error]] into a human-friendly string. The result may be // statically allocated. export fn strerror(err: error) const str = { @@ -20,6 +18,7 @@ export fn strerror(err: error) const str = { if (rn == '\0') { return "Date parsing error"; }; + def FMTMSG = "Invalid date format for specifier '{}'"; static let buf: [len(FMTMSG) + 2]u8 = [0...]; return fmt::bsprintf(buf, FMTMSG, rn); };