Repository navigation
#91 stage 4, H1 follow-up: the names, derives, literals and heads of RuntimeSyntax are validated (RB-19, the read of 021879e4d) - #294
Conversation
…ct-head, type-scope, variant-name, struct-fields, pattern-fields and hidden-allocation refusals, and the comparison whose left operand ends in a cast (red: the validator does not yet refuse them)
… a closed table, a character literal is one scalar value, a struct literal is refused in a condition head, a generic parameter in a let/cast/type argument is refused, and a comparison whose left operand ends in a cast is parenthesised; SPEC 17.16, VERIFICATION and CHANGELOG
|
Maintainer review of
What checked out: every string Landing: after #255 merges I retarget this PR to Generated by Claude Code |
… mut of the site table are gone
|
Maintainer: Generated by Claude Code |
# Conflicts: # CHANGELOG.md
…ter the merge of release/v0.4 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
Stacked on
claude/issue-91-stage4-heap-syntaxat 021879e (#255); draft; to be retargeted torelease/v0.4after #255 merges. It answers the read of 021879e on #255 (its six items) as the maintainer scoped it (comment 6354499859).Identity-neutral. Only
rt_validate.rs,rt.rsandrt_decode.rs(acargo fmtof one pre-existing line) change incrates/lexlean; none is inRENDERER_FILES, so no record and no ID moves. Nothing underlanguage/, no renderer file, no lock, golden or record.What
identifier;Selfandselfare keywords for names and are accepted only as a path head), and a derive must come from a closed table of five (derive:Clone,Copy,Debug,Eq,PartialEq). Sites: item names (unit/tuple/record struct, enum, alias, static, trait, function), generics (tuple struct, record struct, enum, alias parameter, function), record field names, variant names and record variant field names, trait-method names, parameter names,usesegments and aliases, pattern bindings (bindandmut), the field offieldNamed, struct-pattern field names, and path segments after a struct head, an integer head, an enum variant, and an imported head.RtLit.charis one scalar value (item 3), in an expression and in a pattern (char-literal).if/while/while let/for/matchis refused (struct-head; the check mirrors the printer's parenthesisation, so a struct literal the printer would parenthesise is accepted);<that ends in a cast, at any depth (x + y as u8 < z), is printed with that operand in parentheses (rt.rs), so the printer stays a function of the module;lettype, a cast, or a type argument is refused (type-scope): the printer writes those types without the generics in scope, and the runtime has no such use.hidden-allocation(heap type,String, call, method, method with type arguments) in the core profile.RuntimeSemanticsdoes: the expression constructs the module grew by arestuck(except a block and a string literal), and of the pattern constructs a mutable binding binds as a binding does while the tuple, tuple-struct, struct and literal patterns arestuck. The rule list is 40 (sixteen join the 24 of RB-17).R3 and rows
No new register row (RB-19's row and its plants are the home). The first commit (bd6c992) is the case with its plants. Against the validator at 021879e it is red on the 31 plants of the five new rules (
identifier,derive,char-literal,struct-head,type-scope; first asthe rulechar-literalhas no plant, thena unit struct name: ()), on the comparison plant (the printer without the parenthesis), and on RB-17's bijection between the validator's rules and the planted ones; it is not red on the item-5 site plants, which were already green before. The second commit (e06cae1) is the implementation and the text; the third (eaa9dd1) is the review's three nits (Selfamong the keywords, a no-opretainand amutgone).RULESof RB-19 grows from 10 to 15 (char-literal,derive,identifier,struct-head,type-scope).Plants
less(x, y, z) = x + y as u8 < zand then the same text without the parenthesis, whichrustcrefuses withgeneric arguments.conformance_rb_19; a control edit that changes nothing left it green.Gates run
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,validate-modelandvalidate-spec-links(446),check-test-inventory,conformance_rb_15 rb_16 rb_17 rb_19(the last two in 10 s after the build),lexlean --lib: 208 pass; the two record tests (rust_renderer,rust_runtime_core) fail as they do at 021879e.just vvwas not run in full (no pinned-toolchain full run on this host and disk); the parts above are the ones the change can reach.🤖 Generated with Claude Code
https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG