Added a README
This commit is contained in:
parent
ae22ff77da
commit
0d27ee5491
41
README.md
Normal file
41
README.md
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# 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
|
||||||
|
But more features like
|
||||||
|
- If statements
|
||||||
|
- Loops
|
||||||
|
- Function calls in expressions
|
||||||
|
- Comments
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn test output {
|
||||||
|
let number_to_output = output;
|
||||||
|
out(number_to_output);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This code prints 3 and then 2.
|
||||||
|
|
Loading…
Reference in a new issue