Skip to content

Parse object declarations and reserve new allocation syntax#981

Merged
jsiek merged 1 commit into
mainfrom
codex/issue-966-object-syntax
Jun 13, 2026
Merged

Parse object declarations and reserve new allocation syntax#981
jsiek merged 1 commit into
mainfrom
codex/issue-966-object-syntax

Conversation

@jsiek

@jsiek jsiek commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Refs #966

Summary

  • Add ObjectDecl and ObjectField AST nodes with visibility, type parameters, optional bodies, field type checking, import/export participation, and stable pretty-printing.
  • Teach both the LALR and recursive-descent parsers to parse object declarations with omitted bodies, empty bodies, ordinary fields, and ghost var fields.
  • Reserve pure-term new with a parser diagnostic until imperative RHS parsing is available, and add object parser equivalence/round-trip coverage.

Tests

  • python3.13 test-deduce.py --equiv
  • make tests

Codex session

codex://threads/019ec06c-0d07-7142-a7ed-cdf3a83cf2b0

open 'codex://threads/019ec06c-0d07-7142-a7ed-cdf3a83cf2b0'

@jsiek jsiek force-pushed the codex/issue-966-object-syntax branch from dc5e934 to 25b7c73 Compare June 13, 2026 18:56
@jsiek jsiek marked this pull request as ready for review June 13, 2026 19:08
@jsiek jsiek merged commit d66fe59 into main Jun 13, 2026
9 checks passed
@jsiek jsiek deleted the codex/issue-966-object-syntax branch June 13, 2026 19:27
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.

1 participant