Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions NOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Last updated: 2026-08-08

## parser: BDD-style fns skipped; fpga-smoke fully green (Closes #1960)

- `fn name() given ... then ...` (a keyword-style test spelled as a fn, linker.t27) is now recognized BEFORE return-type parsing -- otherwise `given` was consumed as an identifier return type and the body brace check failed
- partition.t27: a parameter named `module` (a keyword) renamed to mod_name
- fpga-build --smoke: 31 modules + wrapper generate -- GREEN again (was red since the #1941 hardening surfaced the silently-dropped constructs)
- tri-net 77-spec icarus gate green; unit suite at the single pre-existing red
- FROZEN_HASH resealed

## parser: braced if-expr arms, paren-less conditions, &-transparent types; fpga specs repaired (Refs #1960)

- If-EXPRESSIONS accept braced arms (`if (c) { 2 } else { 0 }`); if/while STATEMENTS accept paren-less Rust-style conditions with the struct-literal-in-condition rule (a `{` after the cond opens the body)
Expand Down
8 changes: 8 additions & 0 deletions bootstrap/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,14 @@ impl Parser {
}
self.expect(TokenKind::RParen)?;

// BDD-style fn: `fn name() given ... then ...` -- a keyword-style test
// spelled as a fn (linker.t27). Detect BEFORE return-type parsing,
// which would otherwise consume `given` as an identifier return type.
if self.current.kind == TokenKind::Ident && self.current.lexeme == "given" {
self.skip_to_next_top_level();
return Ok(decl);
}

// Optional arrow for return type: -> Type
if self.current.kind == TokenKind::Arrow {
self.advance(); // consume ->
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/stage0/FROZEN_HASH
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ac0310ff69d2c211d638757eaa8704e80a968918ccb93f5fe4ebb353e99a3788
8672ec556e8a02c016306dfce4aa73d843ad98ea08a0e75c032e049806bc6ff5
8 changes: 8 additions & 0 deletions docs/NOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Last updated: 2026-08-08

## parser: BDD-style fns skipped; fpga-smoke fully green (Closes #1960)

- `fn name() given ... then ...` (a keyword-style test spelled as a fn, linker.t27) is now recognized BEFORE return-type parsing -- otherwise `given` was consumed as an identifier return type and the body brace check failed
- partition.t27: a parameter named `module` (a keyword) renamed to mod_name
- fpga-build --smoke: 31 modules + wrapper generate -- GREEN again (was red since the #1941 hardening surfaced the silently-dropped constructs)
- tri-net 77-spec icarus gate green; unit suite at the single pre-existing red
- FROZEN_HASH resealed

## parser: braced if-expr arms, paren-less conditions, &-transparent types; fpga specs repaired (Refs #1960)

- If-EXPRESSIONS accept braced arms (`if (c) { 2 } else { 0 }`); if/while STATEMENTS accept paren-less Rust-style conditions with the struct-literal-in-condition rule (a `{` after the cond opens the body)
Expand Down
4 changes: 2 additions & 2 deletions specs/fpga/partition.t27
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ module Partition {
dsp48 : u32,
}

fn assignment(module: &str, fpga: u32, luts: u32, ffs: u32, bram: u32, dsp: u32) -> PartitionAssign {
fn assignment(mod_name: &str, fpga: u32, luts: u32, ffs: u32, bram: u32, dsp: u32) -> PartitionAssign {
return PartitionAssign{
.module_name = module,
.module_name = mod_name,
.fpga_idx = fpga,
.luts = luts,
.ffs = ffs,
Expand Down
Loading