The compiled version of Simple.
Simple is a simple, interpreted programming language.
It's very easy to use.
CSimple is a compiler for the Simple programming language written in Go.
It has its own bytecode instructions, which you can write and assemble them directly using the built-in assembler.
todo! make performance tests
csimple compile / build <file> | run <file> | assemble <file> | -v / --version | -h / --help
| Command | Description |
|---|---|
| compile / build <file> | compile source code in 'file' to bytecode |
| run <file> | run bytecode in 'file' |
| assemble <file> | assemble code in 'file' to bytecode |
| -v / --version | show the version number |
| -h / --help | show the help message |
Simple has a simple, assembly-like syntax.
You can print to the screen using the print and println statements.
println "Hello, World!"
println inserts a newline character (\n) at the end, print does not.
Declaring variables is simple also! Use this syntax:
name = "value"There are 3 different variable types in Simple: str, num and bool.
You can use the input keyword.
name = input
You can also specify the data type you expect the user to type. If it doesn't match, the language will keep prompting until they type the correct one.
name = input str
age = input num
println "Your name is " + name + " and your age is " + age
Labels are the core of Simple. With them, you don't need loops.
