Repository navigation
v0.5.0-alpha
Pre-releaseTeapotLang 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.