hare

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

commit c170e6f97f87c2f42bac587c650ec4f7eb7e5633
parent 238ae4ea059b4ca4d808d96182038326f6e27a4d
Author: Sebastian <sebastian@sebsite.pw>
Date:   Tue, 17 Oct 2023 21:09:24 -0400

hare::parse: statically allocate error msg

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

Diffstat:
Mhare/parse/parse.ha | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hare/parse/parse.ha b/hare/parse/parse.ha @@ -19,7 +19,8 @@ fn syntaxerr( fmt: str, args: fmt::field... ) lex::error = { - let why = fmt::asprintf(fmt, args...); + static let buf: [4096]u8 = [0...]; + let why = fmt::bsprintf(buf, fmt, args...); return lex::syntaxerr(loc, why); };