plonkus/README.md

45 lines
730 B
Markdown
Raw Normal View History

2023-09-27 09:21:10 +02:00
# Plonkus
## About
This is a small hobby language that I created because I was bored.
It only supports [my own architecture](https://github.com/vanten-s/8bit-computer) but I'm planning to extend it to x86 some day.
## Features
Currently the language has the following
- Expressions
- Scopes
- Functions
- Variables
2023-09-27 09:25:35 +02:00
2023-09-27 09:21:10 +02:00
But more features like
2023-09-27 09:25:35 +02:00
2023-09-27 09:21:10 +02:00
- If statements
- Loops
- Function calls in expressions
- Comments
2023-09-27 09:25:35 +02:00
2023-09-27 09:21:10 +02:00
Are coming.
## Syntax
Here is example of functions, built-ins and variables and Scopes
```plonkus
fn main {
let a = 2;
{
let a = a + 1;
out(a);
}
test(a);
exit();
2023-09-27 09:24:42 +02:00
};
2023-09-27 09:21:10 +02:00
fn test output {
2023-09-27 09:24:42 +02:00
let numberToOutput = output;
out(numberToOutput);
};
2023-09-27 09:21:10 +02:00
```
This code prints 3 and then 2.