hare

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

commit ae4bcefee4ba0ca0b03b603daf310059da8f726c
parent 3f28ea119380bfc0bf68b7d83d6c0bf8e577b71e
Author: Alexey Yerin <yyp@disroot.org>
Date:   Sun, 11 Apr 2021 19:36:26 +0300

unix/passwd: split out error type to types.ha

Prerequisite for supporting multiple formats like /etc/group or
/etc/shadow.

Diffstat:
Mscripts/gen-stdlib | 3++-
Mstdlib.mk | 6++++--
Munix/passwd/passwd.ha | 3---
Aunix/passwd/types.ha | 2++
4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/scripts/gen-stdlib b/scripts/gen-stdlib @@ -622,7 +622,8 @@ unix() { unix_passwd() { gen_srcs unix::passwd \ - passwd.ha + passwd.ha \ + types.ha gen_ssa unix::passwd bufio io os strconv strings } diff --git a/stdlib.mk b/stdlib.mk @@ -818,7 +818,8 @@ $(HARECACHE)/unix/unix.ssa: $(stdlib_unix_srcs) $(stdlib_rt) $(stdlib_errors) # unix::passwd stdlib_unix_passwd_srcs= \ - $(STDLIB)/unix/passwd/passwd.ha + $(STDLIB)/unix/passwd/passwd.ha \ + $(STDLIB)/unix/passwd/types.ha $(HARECACHE)/unix/passwd/unix_passwd.ssa: $(stdlib_unix_passwd_srcs) $(stdlib_rt) $(stdlib_bufio) $(stdlib_io) $(stdlib_os) $(stdlib_strconv) $(stdlib_strings) @printf 'HAREC \t$@\n' @@ -1672,7 +1673,8 @@ $(TESTCACHE)/unix/unix.ssa: $(testlib_unix_srcs) $(testlib_rt) $(testlib_errors) # unix::passwd testlib_unix_passwd_srcs= \ - $(STDLIB)/unix/passwd/passwd.ha + $(STDLIB)/unix/passwd/passwd.ha \ + $(STDLIB)/unix/passwd/types.ha $(TESTCACHE)/unix/passwd/unix_passwd.ssa: $(testlib_unix_passwd_srcs) $(testlib_rt) $(testlib_bufio) $(testlib_io) $(testlib_os) $(testlib_strconv) $(testlib_strings) @printf 'HAREC \t$@\n' diff --git a/unix/passwd/passwd.ha b/unix/passwd/passwd.ha @@ -4,9 +4,6 @@ use os; use strconv; use strings; -// An invalid entry was encountered during parsing. -export type invalid = void!; - // A Unix-like password database entry. export type pwent = struct { // Login name diff --git a/unix/passwd/types.ha b/unix/passwd/types.ha @@ -0,0 +1,2 @@ +// An invalid entry was encountered during parsing. +export type invalid = void!;