Skip to content

Commit 48d0ab0

Browse files
fix(semantic): surface DoubleSubject and MissingVerb errors (#603)
When encountering structural syntax violations such as `DoubleSubject` (multiple nominatives fed as a subject) or `MissingVerb` (an assembled sentence lacks an action but contains subjects or objects), the Semantic Assembler silently allowed execution to proceed into the code generation phase. This caused raw `rustc` compiler failures (like `E0425: cannot find value`) to be surfaced to developers instead of the intended, idiomatic Greek error messages (`Διπλοῦν ὑποκείμενον`, `Ῥῆμα οὐχ εὑρέθη`). This commit adjusts `Assembler::handle_nominative` to immediately return `AssemblyError::DoubleSubject` when a second standalone nominative is fed, and `Assembler::finalize` to strictly assert `AssemblyError::MissingVerb` for incomplete statements while preserving valid verbless fallback patterns (like solitary queries, pure literal evaluations, or property access chains) for tests. Tested via direct AST mocks and full integration runs. Co-authored-by: madmax983 <1848860+madmax983@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent ee3d8f3 commit 48d0ab0

0 file changed

File tree

    0 commit comments

    Comments
     (0)