Skip to content

v0.5.0-alpha

Pre-release
Pre-release

Choose a tag to compare

@Sim20004 Sim20004 released this 26 Aug 14:00
· 139 commits to main since this release

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 Symbol and SymbolTable implementations.

  • 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.tp

Instead of:

python main.py --input examples/hello.tp

The 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 --trace

Testing

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
  • while blocks
  • if blocks

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.tp to examples/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.py to the installed teapot command.
  • requirements.txt has been removed.
  • main.py has been moved into the teapot package.

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.