Skip to content

feat: extend guard parser with >=/<=/bare bool/negation#78

Merged
nerdsane merged 3 commits intomainfrom
worktree-indexed-swinging-gizmo
Mar 18, 2026
Merged

feat: extend guard parser with >=/<=/bare bool/negation#78
nerdsane merged 3 commits intomainfrom
worktree-indexed-swinging-gizmo

Conversation

@nerdsane
Copy link
Owner

Summary

  • Fix >=/<= operator parsingsplit_once('>') was mis-splitting >=, corrupting variable names. Now checks 2-char operators before 1-char (same pattern as assert_parser.rs).
  • Add bare boolean guard syntaxguard = "has_mutation" now works as shorthand for is_true has_mutation.
  • Add negation support!var, is_false var, and { type = "is_false", var = "..." } all produce the new IsFalse guard variant, propagated through the full stack (spec → translate → JIT → verify → SMT).

Test plan

  • 13 new parser tests (all operators, bare bool, negation, error case)
  • All 147 temper-spec tests pass
  • All 35 temper-jit tests pass
  • All 76 temper-verify tests pass (including SMT/Z3)
  • Full workspace test suite passes (430+ tests)
  • Pre-push gates: rustfmt, clippy, readability ratchet, full tests

🤖 Generated with Claude Code

rita-aga and others added 3 commits March 18, 2026 17:23
Fix guard parser to handle >=, <= operators (split_once bug), bare
boolean identifiers as IsTrue shorthand, and !var/is_false negation.
Full stack: spec parser → translate → JIT runtime → verify model → SMT.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Moves tests to toml_parser_tests.rs to keep toml_parser.rs under the
1000-line readability ratchet threshold.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nerdsane nerdsane merged commit 760f57f into main Mar 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants