An open API service indexing awesome lists of open source software.

https://github.com/amila-rukshan/chocopy

ChocoPy - statically typed subset of Python.
https://github.com/amila-rukshan/chocopy

chocopy dynamic-dispatch llvm object-oriented programming-language

Last synced: 7 months ago
JSON representation

ChocoPy - statically typed subset of Python.

Awesome Lists containing this project

README

          

This tree is to implement **ChocoPy** language using LLVM compiler infrastructure.

## ChocoPy v2.2

See [chocopy.pdf](./chocopy.pdf) for a full description of ChocoPy language with Type Checking and Operational Semantics.

## Related content

### Blog posts

- [Building Dynamic Dispatch in ChocoPy: From Concept to Code](https://developerdiary.me/building-dynamic-dispatch-in-chocopy-from-concept-to-code/)

## How to run?

A Dev container is setup for linux OS with the llvm dependancies. Just open the project in `VSCode` and from the Debug window, run `Debug ChocoPy`.

## TODOS

- [x] Lexing
- [x] Parsing
- [x] Classes, methods and attributes (with default values)
- [x] \_\_init\_\_ method (aka class constructor) to initilize attributes
- [x] Method calling with dynamic dispatch
- [x] Builtin 'print' function
- [x] Builtin 'str' type
- [ ] Complete type checking
- [x] Control flows - if else and while
- [x] Binary and unary oprations for int, bool and str types