Skip to content

Claude/publish spec interpreter eg9jk#19

Merged
hyperpolymath merged 2 commits intomainfrom
claude/publish-spec-interpreter-EG9jk
Dec 27, 2025
Merged

Claude/publish spec interpreter eg9jk#19
hyperpolymath merged 2 commits intomainfrom
claude/publish-spec-interpreter-EG9jk

Conversation

@hyperpolymath
Copy link
Owner

No description provided.

Add a condensed language specification (SPEC.md) and release documentation
(RELEASE.md) for the first public release of the AffineScript reference
parser.

New examples demonstrate additional language features:
- effects.as: Effect handling with State and Exn
- traits.as: Traits, type classes, and bounded polymorphism
- refinements.as: Refinement types and compile-time verification

This provides a minimal publishable package with:
- Complete lexer and parser (reference implementation)
- Language specification covering syntax and semantics
- Comprehensive examples covering all major features
Add golden test infrastructure that compares parser AST output against
expected files for regression testing.

New test infrastructure:
- test/test_golden.ml: Golden test runner with span normalization
- test/golden/: Directory containing .as source and .expected AST files

Golden tests cover:
- hello.as: Basic function declaration
- literals.as: All literal types (int, float, bool, string, char, unit)
- binary_ops.as: Operators and precedence
- functions.as: Function declarations (simple, total, generic, public)
- types.as: Type declarations (alias, struct, enum)
- effects.as: Effect declarations with operations
- patterns.as: Pattern matching (literals, destructuring, constructors)
- traits.as: Trait declarations and implementations
- ownership.as: Ownership modifiers (own, ref, mut)
- rows.as: Row polymorphism syntax
- lambda.as: Lambda expressions
- imports.as: Module imports

Also adds example parse tests that verify all examples/*.as files parse
successfully without checking specific AST structure.
@hyperpolymath hyperpolymath merged commit 27e4aa2 into main Dec 27, 2025
1 of 3 checks passed
@hyperpolymath hyperpolymath deleted the claude/publish-spec-interpreter-EG9jk branch December 27, 2025 18:23
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