Skip to content
This repository has been archived by the owner on Jul 3, 2022. It is now read-only.
/ yaplox Public archive

Yet Another Python implementation for Lox

License

Notifications You must be signed in to change notification settings

RoelAdriaans/yaplox

Repository files navigation

YaPlox - Yet Another Python implementation for Lox

Code style: black Python Run Tox codecov Total alerts

This project is a python implementation for Lox. Read more at https://craftinginterpreters.com

Structure

Since we're implementing this in Python, the structure will be a little bit different. For example, the main class is called Yaplox, and not Lox as in the original implementation.

Files

  • lox/Lox.java is called yaplox/yaplox.py

Poetry

This project uses poetry to manage dependencies. Some commands:

Add dependency

Add a new package to the dependencies use:

poetry add <Package>

To add it a a development dependency use:

poetry add -D <package>

Install project

Install the project with the command

poetry install

Pre-commit

This project uses pre-commit. Pre-commit runs all the required tools before committing. This useful tool will be installed with poetry install, or manually with

pip install pre-commit

After installation run:

pre-commit install

Now every time before running git commit the hooks defined in the .pre-commit-config.yaml file will be run before actually committing. To run this manually, run:

pre-commit run --all-files

Update pre-commit

Update the .pre-commit-config.yaml with the command:

pre-commit autoupdate

This command will go online and find the latest versions.

Other useful commands

Update packages:

poetry update

Show installed packages:

poetry show --tree

It's possible to add --no-dev to hide the development dependencies.

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages