Repository navigation
Releases
v0.6.3-alpha
TeapotLang v0.6.3-alpha
This release improves the browser playground, fixes issues in semantic analysis, and strengthens regression testing. It also includes documentation and test-suite improvements.
Highlights
Browser playground fixes
- Fixed compiler loading in the browser playground.
- Fixed Python package path handling and conversion of serialised compiler output.
Semantic analysis
- Fixed
infer_expression_type()returning incorrect results for literals. - Restored missing comments in development code.
Testing and maintainability
- Added regression tests for struct field, enum member, and top-level declaration ordering in serialised compiler output.
- Split
test_coverage_gapsinto separate per-component files. - Added a test-only change.
Documentation
- Updated the README to make it more user-friendly.
Notes
This is an alpha release. Features and behaviour may change in future releases.
Full changes
See the compare view for the full list of changes.
v0.6.2-alpha
TeapotLang v0.6.2-alpha
TeapotLang v0.6.2-alpha introduces the first substantial implementation of semantic type checking, building on the symbol and scope analysis introduced in v0.6.1-alpha.
Highlights
Semantic type checking
TeapotLang can now perform significantly more validation of programs before later compilation stages:
- Added type checking for variable declarations.
- Added validation of datatype bounds.
- Added detection of invalid and
voiddatatypes. - Added operator type checking.
- Added binary-expression type inference.
- Added validation of function return types.
- Unified return-type checking between functions and operators.
- Added dedicated semantic errors for type mismatches and invalid return types.
- Added handling for invalid type combinations in binary expressions.
These changes establish the foundations for the language's type system and allow semantic errors to be detected before code generation.
Improved semantic analysis
Semantic analysis has also been reorganised and expanded:
- Split semantic analysis into separate modules.
- Improved symbol registration and scope handling.
- Added support for redefining already-initialised variables.
- Added enum support to semantic analysis.
- Added struct-field symbol construction.
- Added function-argument handling.
- Fixed
breakandcontinuehandling in nested loops. - AST nodes that are intentionally handled by later compiler stages are now ignored by semantic analysis rather than incorrectly producing errors.
Testing and quality
This release significantly expands TeapotLang's test coverage and development infrastructure:
- Added a large contributor test suite containing approximately 9,000 additional tests.
- Added extensive semantic-analysis tests.
- Added integration tests for type inference and invalid type combinations.
- Restored the project to 100% test coverage.
- CI now fails when test coverage falls below 100%.
- Improved Codecov integration.
- Added additional parser coverage.
Documentation and project improvements
- Expanded and clarified the language specification.
- Updated documentation to match the current implementation.
- Added a project roadmap.
- Expanded contributor and security documentation.
- Added the TeapotLang trademark policy.
- Continued improvements to the project website and release infrastructure.
Bug fixes
This release also includes numerous smaller fixes to the parser, semantic analyser, tests, build system, website, and development tooling.
What's next?
Semantic analysis is still under active development. The next stages will continue building the compiler pipeline towards code generation and runtime support.
v0.6.2-alpha is an early development release and should not be considered production-ready.
v0.6.1-alpha
TeapotLang v0.6.1-alpha
Added
- Semantic analysis now supports operator declarations (
operator +(...)). Operator symbols, their arguments, and their bodies are registered in the symbol table via newregister_operator,register_operator_arguments, andregister_operator_argumentmethods.
Fixed
- Fixed a parser bug in
handle_operator_arguments()where only the first argument in a multi-argument operator declaration was parsed correctly; additional comma-separated arguments are now handled properly.
Changed
- Updated maintainer contact information to include an email address (
MAINTAINERS.md). - Clarified vulnerability-reporting instructions with a fallback contact method (
SECURITY.md). - Added
ROADMAP.mdoutlining the project's planned direction across alpha, beta, and 1.0 milestones.
Tests
- Updated parser tests for operator declarations to reflect that argument
datatype/nameare now token objects.
v0.6.0-alpha
TeapotLang v0.6.0-alpha
Semantic analysis
- Reworked the
Symbolmodel to separate declaration scope from owned scope:scopenow consistently means the scope a symbol is declared in.- A new
child_scopefield represents the scope a symbol owns (e.g. a function's body scope, a struct's field scope). Previouslyscopeconflated both meanings depending on symbol kind, which made function and variable symbols behave inconsistently. - Removed the now-redundant
paramsfield fromSymbol.
- Added real semantic support for struct fields, enum declarations, enum members, error declarations, and error members. These were previously unregistered and would raise
SemanticError("Unknown node") when encountered.- New handlers:
register_struct_field,register_enum,register_enum_member,register_error,register_error_member. - Structs, enums, and errors now each get their own child
SymbolTable, so their members are scoped correctly rather than being ignored or leaking into the enclosing scope.
- New handlers:
Tests and fixtures
- Added
examples/fixtures/parser-sem-an.tp, a larger end-to-end fixture exercising structs, enums, errors, and operators together. - Rewrote
examples/fixtures/semanticanalysis.tpto include enum and error declarations, which it previously omitted. - Updated the semantic and integration test suites to assert against
child_scopeinstead ofscopefor functions and structs, and added new coverage for enum, error, and struct-field registration, plus nested-function scope-chain behaviour.
Notes
This release focuses entirely on internal semantic-analysis structure and does not change the language surface, parser grammar, or CLI behaviour. Code generation and executable output remain unimplemented.
v0.5.5-alpha
TeapotLang v0.5.5-alpha
Updated version in init.py.
v0.5.4-alpha
TeapotLang v0.5.4-alpha
TeapotLang v0.5.4-alpha introduces a new browser-based compiler experience, a redesigned project website, improved project automation, and several documentation and discoverability improvements.
Highlights
Web compiler
- Added a browser-based TeapotLang compiler.
- Added the JavaScript compiler bridge used by the web interface.
- Added Python web integration for serving and interacting with the compiler.
- Improved the overall experience of experimenting with TeapotLang in a browser.
Website
- Significantly redesigned and expanded the TeapotLang website.
- Improved the layout, styling, navigation, and presentation of language information.
- Added additional project information and examples.
- Improved the site’s overall usability and visual consistency.
Documentation
- Updated the README with the latest project information.
- Updated the development documentation.
- Updated the language reference to reflect current behaviour.
Project infrastructure
- Added automated GitHub Pages deployment.
- Added Dependabot configuration for dependency updates.
- Added robots.txt and sitemap.xml for improved search-engine discoverability.
Other changes
- Minor cleanup and improvements to the compiler entry point.
- Various documentation and website refinements.
Notes
This is an alpha release. Features and APIs may change significantly in future releases.
The web compiler and associated tooling are still under active development and may contain bugs or incomplete functionality.
Full changes
This release contains all changes made since v0.5.3-alpha.
v0.5.3-alpha
TeapotLang v0.5.3-alpha
Added TeapotLang website - no other changes made.
v0.5.2-alpha
TeapotLang v0.5.2-alpha
Updated stale docs - this is the only change from v0.5.1-alpha.
v0.5.1-alpha
TeapotLang v0.5.1-alpha
Type: Patch release (internal cleanup, no new features)
Changed
- Simplified
SemanticAnalyserinternals:global_scopeis now initialized once in__init__rather than being threaded through as an explicitscopeparameter onfirst_pass_symbol_tableand thedefine_*methods. Module-level declarations implicitly targetself.global_scope; function parameter scopes remain separately scoped as before. - Removed a stray test fixture file no longer in use.
Notes
- No changes to the parser grammar, CLI, or language syntax.
- No user-facing behavior changes — this is an internal refactor to reduce parameter-passing boilerplate in the semantic analysis pass.
v0.5.0-alpha
TeapotLang v0.5.0-alpha
This release introduces the foundation of semantic analysis and significantly improves TeapotLang's CLI, testing, CI, and developer experience.
Highlights
Semantic analysis
-
Added the first-pass semantic analyser.
-
Added
SymbolandSymbolTableimplementations. -
Added global and nested symbol scopes.
-
Added parent-scope symbol lookup.
-
Added duplicate symbol detection.
-
Added symbol definitions for:
- Variables
- Structs
- Functions
- Function arguments
-
Added
SemanticError. -
Added the structure for a second-pass type checker.
-
Added formatted symbol-table output when using
--trace.
CLI and packaging
The compiler now has a proper installed CLI:
teapot --input examples/hello.tpInstead of:
python main.py --input examples/hello.tpThe CLI has been moved into the teapot package and is exposed through the pyproject.toml console-script entry point.
Also added:
teapot --version
teapot --help
teapot --traceTesting
Added a new integration test covering the lexer → parser → semantic-analysis pipeline.
Added extensive semantic-analysis unit tests covering:
- Symbol creation
- Symbol-table definitions
- Symbol lookup
- Nested scopes
- Duplicate declarations
- Variable declarations
- Struct declarations
- Function declarations
- Function parameters
- First-pass analysis
- Empty programs
- Unsupported AST nodes
Also added parser regression tests for empty:
- Functions
whileblocksifblocks
CI
The GitHub Actions workflow has been improved to run:
- Ruff
- mypy
- pytest
- Package building
- pip-audit
CI now installs TeapotLang itself rather than relying on requirements.txt.
Examples and documentation
- Added
examples/operators.tp. - Renamed
examples/example.tptoexamples/hello.tp. - Removed obsolete parser test examples.
- Updated README CLI documentation.
- Updated development documentation.
- Added the TeapotLang Discord badge.
Developer tooling
Added scripts/commit.sh, which runs the project's main checks before creating a commit and optionally pushing it to the remote repository.
Breaking changes
- The compiler CLI has moved from
python main.pyto the installedteapotcommand. requirements.txthas been removed.main.pyhas been moved into theteapotpackage.
Known limitations
Semantic analysis is still in its early stages. The current implementation primarily constructs the symbol table. The second-pass type checker has not yet been implemented.
TeapotLang does not yet generate executable code.
What's next
The next development milestones will focus on expanding semantic analysis, particularly type checking and semantic validation.