3.7 KiB
3.7 KiB
1.0.0-beta.16 String Scanning And Token Boundary Foundation
Status: combined Slovo/Glagol release scope for 1.0.0-beta.16.
1.0.0-beta.16 adds the first explicit string scanning and token-boundary
source facades to std.string: byte access, substring extraction, and
prefix/suffix checks over the current runtime string representation. The
release also promotes the matching compiler-known runtime names through the C
runtime, LLVM lowering, source fallback evaluator, diagnostics inventory,
local facade fixtures, and release-gate coverage.
Scope
- Add
byte_at_result ((value string) (index i32)) -> (result i32 i32)tolib/std/string.slo. - Add
slice_result ((value string) (start i32) (count i32)) -> (result string i32)tolib/std/string.slo. - Add
starts_with ((value string) (prefix string)) -> booltolib/std/string.slo. - Add
ends_with ((value string) (suffix string)) -> booltolib/std/string.slo. - Mirror those source facades in
examples/projects/std-layout-local-string/src/string.slo. - Extend the local and explicit
std.stringexamples with success and ordinary failure checks for the four helpers. - Promote matching Glagol runtime entries for
std.string.byte_at_result,std.string.slice_result,std.string.starts_with, andstd.string.ends_with. - Add LLVM declarations and lowering for the four promoted runtime names.
- Add C runtime implementations for byte access, byte slicing, prefix checks, and suffix checks.
- Extend the source fallback test runner behavior for those names.
- Add focused beta16 compiler coverage for lowering, hosted runtime execution, and source fallback execution.
- Extend diagnostics snapshots for arity, type, context, shadowing, and richer unsupported string-scanning names.
- Extend standard-library source-search and local-facade fixtures plus promotion-gate inventory alignment.
- Update README,
lib/std/README.md, post-beta roadmap, language roadmap, release notes, v1 spec, generated stdlib API, compiler docs, release gate, and standard-runtime catalog for beta16.
Contract
- Helpers are byte-oriented over bytes before the trailing NUL in current runtime strings.
byte_at_resultreturnsok bytefor a valid zero-based byte index anderr 1for invalid indexes.slice_resultreturnsok textfor a valid byte range anderr 1for invalid ranges.slice_resultallocation failure may follow the existing string allocation trap policy.starts_withandends_withperform byte prefix/suffix checks; empty prefix and suffix match.
Explicit Non-Scope
- no Unicode scalar, grapheme, display-width, locale, normalization, or case-folding promise
- no JSON parser
- no object or array parser
- no tokenizer/scanner object API
- no language slice/view syntax or borrowed substring view
- no mutable strings or string containers
- no stable stdlib/API freeze
- no stable ABI/layout or ownership guarantee for returned string allocations
- no performance claim
- no maps, sets, generic collections, or recursive JSON value support
- no worker-owned commit, tag, push, or publication before controller gates
Expected Verification
cargo fmt --checkcargo test --test standard_string_scanning_beta16cargo test --test diagnostics_contractcargo test --test standard_string_source_fallback_helpers_alphacargo test --test standard_core_facade_source_search_alphacargo test --test string_runtimecargo test --test promotion_gate -- --ignoredcargo testgit diff --check- stale current-stage scan for
1.0.0-beta.15 - public-text scan for local usernames, local filesystem paths, and private host publication references
- final
./scripts/release-gate.shafter commit and generated catalog sync