Compiler and tools for the Little programming language.
fn main() : void {
(printf "%s\n" "Hello, World!")
}
fn add(int a, int b) : int {
(return (+ a b))
}
fn main() : void {
(defvar sum (add 5 10))
(printf "%i\n" sum)
}
To build the Little
compiler, simply run:
make
Note: This will generate a binary file in the
bin
directory calledlittle
.
The test cases can be run with the --test
flag:
bin/little --test
Note: They do not they all possible cases, but most of them are covered.
To compile a file, use the generated binary from the build step:
bin/little test_file.lil
Note: This will generate another binary in the
bin
directory calleda
.
- Addition (+)
- Subtraction (-)
- Multiplication (*)
- Division (/)
- Modulus (%)
- Conditions
- Function Definitions
- Function Calls
- Comments
- Integers
- Floats
- Structs
- Enums
- Arrays
- Scopes
- If Statements
- For-Loops
- While-Loops
- Variable Assignments