lib: add missing Hare-stdlib functions (ascii/bytes/strings/path/endian)
ascii: valid, validstr, ispunct, isprint, iscntrl, isgraph, isblank, strcasecmp. bytes: hasprefix, hassuffix, rindex, rindexbyte, contains, reverse, zero. strings: rindex, sub, trimprefix, trimsuffix, ltrimbyte, rtrimbyte, trimbyte. The byte-set trim is a single-byte subset of Hare's `trim(input, exclude: rune...)`; no variadic ABI yet. path: dirname, basename, extension, join. Owned-str returns where the result isn't a borrowed view of the input (join). endian: full Hare table — be/le get/put for u16/u32/u64 plus the network-order htonu/ntohu pair extended to 32/64. lib/CLAUDE.md rewritten to reflect the post-graduation policy (tagged-union returns, owned-str returns, plan9 names, documented deviations for non-graduating modules). Makefile picks up lib/ascii and lib/fmt as wwdump_ww / w6c_ww deps so lib-only edits regenerate the affected binaries.
This commit is contained in:
4
Makefile
4
Makefile
@@ -113,7 +113,7 @@ $(BIN)/wwdump_ww: selfhost/cmd/wwdump/main.ww \
|
||||
selfhost/cmd/wcc/cgen.ww selfhost/cmd/wcc/cgenexpr.ww \
|
||||
selfhost/cmd/wcc/cgenstmt.ww selfhost/cmd/wcc/cgenutil.ww \
|
||||
selfhost/cmd/wcc/cgendecl.ww \
|
||||
lib/os/os.ww lib/strconv/strconv.ww \
|
||||
lib/os/os.ww lib/strconv/strconv.ww lib/ascii/ascii.ww lib/fmt/fmt.ww \
|
||||
$(BIN)/ww $(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
cd $(BIN) && ./ww build \
|
||||
@@ -134,7 +134,7 @@ $(BIN)/w6c_ww: selfhost/cmd/w6c/main.ww \
|
||||
selfhost/cmd/wcc/cgen.ww selfhost/cmd/wcc/cgenexpr.ww \
|
||||
selfhost/cmd/wcc/cgenstmt.ww selfhost/cmd/wcc/cgenutil.ww \
|
||||
selfhost/cmd/wcc/cgendecl.ww \
|
||||
lib/os/os.ww lib/strconv/strconv.ww \
|
||||
lib/os/os.ww lib/strconv/strconv.ww lib/ascii/ascii.ww lib/fmt/fmt.ww \
|
||||
$(BIN)/ww $(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
cd $(BIN) && ./ww build \
|
||||
|
||||
Reference in New Issue
Block a user