The wave programming language is a project that I wrote in my free time. The language is designed for use in embedded systems and its writing style is strongly inspired by C. Wave is functional as well as static and strongly typed.
func sum(int x, int y) : int {
return x + y;
}
entrypoint(uint argument_count, str[] arguments) {
print_format("the sum of 1 and 2 is: %i", sum(1, 2));
exit 0;
}
(this example does not work for now)
- multi-pass compiler
- optimizing compiler (soon)
- embedding api
- exception handling
- portable (small vm)
Working examples can be found in the resources/scripts/
folder.
The language is still in its early stages, so don't expect too much.
as of now only CMake has been tested
Current list of planned and implemented functions (though not all):
- entrypoint
- expressions
- globals variables
- local variables
- str data type
- functions
- parameters and default values (partially)
- return statement
- extern functions
- function calls (partially)
- variadic function parameters
- statements
- goto / label statement
- if / else statement
- ternary if statement
- do statement
- while / while do statement
- for / for else statement
- try catch statement
- complex data types
- enumerations
- arrays
- structs
- preprocessor
- define statement
- define arguments
- if / else statement
- variadic define arguments
- preprocessor functions
- concat function
- stringify function
- other
- namespaces
- typedef
- typeof
- sizeof
Compile-time features like debugging options can be enabled and disabled in the src/common/defines.h
header.