You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
t27b: move the source-text rules of lower.rs (parse_int, char_literal, int_lit_width, header_line and more) to specs/tri/t27b/source_text.t27 #8248
Port slice of #6198 (t27b written in t27), under #6063 and #5980. It follows #8229 (merged), whose specs/tri/t27b/type_text.t27 it reuses for trimming.
What
cli/t27b/src/lower.rs reads source text that the t27c parser keeps in the AST, with hand-written Rust:
parse_int: an integer literal's text, decimal or 0x / 0X, 0o, 0b, with _ separators;
char_literal: a char literal's text, with the escapes Zig takes;
int_lit_width: the width t27c's Zig backend pins on an untyped var of an integer literal;
header_line: the line of a <keyword> <name> header in the source, for a node the parser built from text;
is_prose_clause: the <word>: label of a prose clause;
the element split of text_lit: an array literal whose elements the parser kept as one text.
This issue moves them to specs/tri/t27b/source_text.t27.
Plan
The spec has test blocks whose expected values come from the hand-written Rust on master. The integer parser follows Rust's u128::from_str_radix, so its optional + and its overflow behave as before.
t27c gen-rust writes gen/rust/tri/t27b/source_text.rs, which is mounted with #[path] in lower.rs as st. The hand bodies are deleted, and the old signatures stay as one- or two-line glue.
lower.rs loses those hand-written bodies, its hand glue stays within master's check_budget caps, and the net change in hand lines under cli/t27b/ is negative.
The corpus receipts show no file changed its verdict or its t27b asm digest, apart from the new spec itself.
Activity
Merge master 262ae92 into t27b-port-lower-source-text (Closes #8248)
Merge master b9d22d0 into the source-text port (Closes #8248)
Merge master 3ac8bef into the body-walk port (Closes #8249)