Skip to content

jamesparsloe/tinypy

Repository files navigation

tinypy

A toy version of Python. For now I'm doing the absolute minimum to make examples/fibonacci.py work and then I'll expand to a slightly bigger subset of Python and see where I get to. I'm somewhat following along with the Crafting Interpreters tree-walk interpreter design.

Getting Started

uv sync --all-extras --dev
uv run tinypy -v
uv run tinypy examples/statements.py

Testing

uv run pytest

and also REPL tests

chmod +x test.sh
./test.sh

TODO

  • Error handling
    • Syntax errors
    • Runtime errors
  • Variables
  • Functions
  • Convert print statements to functions
  • Type checking??

BUGS

  • I've messed up newlines, dedents, and all that. Scripts are currently not robust to whitespace...

About

A toy version of Python written in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published