o
odinpkg.dev
packages / library / odin-interpreter

odin-interpreter

3fbbf89library

Building a basic interpreter in odin. The entire thing of this project is that we take a file, and turn it into code that odin just runs, keeping it super simple (I am not touching assembly). This program was made to be simple and a learning project, do not learn anything from what I do, I am not a good programmer."

No license · updated 5 days ago

O2 Language written in odin

I have no idea what to call this language, and it's odin 2, and oxygen can be quite reactive... anyways, sorry if it is taken, I don't care at the moment.

What is this project?

Why am I making this?

This project is me trying to learn the basics of interpreters. This is not a good interpreter or language, I just really want to learn how to do these things.

How does this work?

Currently the project doesn't, but I am working on that. The plan for this language is quite simple, I want to have an input file, that the program can undestand, and then based on that execute odin code. I don't have any desire to learn assembly or any other language, so I just want to execute odin code.

What is currently finished?

At the time of writing this, the only thing I have completed is a basic tokeniser, it is really bad I know don't worry. If you check out TODOS.md you can see the stuff I have on my todo list. Don't expect this language to update too often, and most commits will probably not work. Go back to a working commit if you can, I will try to make this obvious, probably with a feat: or similar, maybe a working tag? I got no idea, I need to think about how git works...

How do I run this project?

As long as you have make and the odin compiler, the program should work. Although, knowing windows it might not. Simply run make run (file) should run it, or if you want to compile as release do make build-release and then run the executable in the build folder

What is in the examples folder?

A bunch of examples that I am using to test each releases on what works and doesn't. These will change along with the language.

What is the syntax?

I have no idea. Currently there is none, and I need to start thinking about it. The language uses semi-colons as end-statements, and {} as block definition. Other than that it will be a staticly typed language, using the syntax of: var : type = (value). The language will have strings, booleans, integers, and floats. More might come later, I don't know.

What can I do in the language?

Nothing! I am working on getting a basic hello, world program working, which is simply: println("Hello, World!"); After that more stuff shall come!

Banana

Why are you reading this?