Awesome
Rokkstar
This is a WIP parser and interpreter for the rockstar programming language, written in Kotlin.
Project layout
ast
: abstract syntax tree classestypesystem
: logic rockstar's dynamic typesparser
(usesast
): parser (and lexer) for building up an AST from source codeinterpreter
(usesast
andtypesystem
): interpreter that traverses the AST
Using the runner via gradle
# starts the api on port 8080 (`Listen to ...` will always receive empty strings)
./gradlew run --args='api 8080'
# launches the interpreter on the given file (Will not work with `Listen to ...`, you have to run it manually in that case)
./gradlew run --args='run <file>'
Starting the api in a docker container
# start the api on port 8080
docker run --rm -p 8080:8080 ascheja/rokkstar api 8080
Plans for the future
- Add more tests, enable github-ci
- Add position tracking for tokens
- Improve error handling in Parser (try to recover from exceptions)
- Rockstar plugin for IntelliJ IDEA
- Provide a Docker image
- Make Rokkstar runnable on all Kotlin platforms (jvm, javascript, kotlin-native) and/or graal/substratevm
- Use llvm (via kotlin-native) to create a real compiler
Known Issues
- Poor error messages