A simple programming language I made using C++, which transpiles to C. This is still a WIP I will update occasionally, do let me know if you have any suggestions!
Run make in the root of the project to compile. It uses GCC.
Compile manually if you are using Clang or MSVC, link all the .cpp files
Comments:
// This is a commentVariables:
var x: u8 = 5;Constants:
const x: u8 = 5;Pointers:
var x: u8 = 5;
ptr x_ptr: u8 = &x;Functions:
func add(var x: i32, var y: i32) - i32 {
return x + y;
}Conditionals:
var x: u8 = 5;
if x == 5 {
} elseif x == 10 {
} else {
}While loop:
var y: u32 = 100;
while y == 100 {
}For loop:
var x: u8 = 0;
for x = 0; x < 100; x = x + 1 {
}Structures (no ';' needed):
structure x {
var x: u32,
var y: u32,
var z: i8
} Importing module (.zx):
@import("module.zx");Including header (.h):
@include("header.h");Examples are in the folder examples/
License is in the file LICENSE