Verity is an AOT-compiled programming language, designed to maximize readability and DevEx.
import "std/fs" as fs;
proc add(int a, int b) returns int {
return a + b;
}
proc readFile(string path) returns string throws FileNotFoundError {
return propagate fs.readAsText(path);
}
proc main() returns int {
int x = 5;
mut int y = 10;
y = y / x;
print(add(x, y));
print(readFile("./config.txt"));
}
Build requirements:
- Make
- Bash (or compatible; on Windows MSYS or Git Bash)
- GCC
- Clang-tidy
- Cppcheck
To build and run this project, run these commands:
make
make runTo run the test suite, run the following command:
make testTest files can be generated with the following command:
python tests/tools/gen.py {type} {module}where type is either: unit, or e2e and module is the name of a module in the src folder.
This project uses an epoch versioning system: {EPOCH}.{COUNTER} where {EPOCH} is the epoch, and {COUNTER} is the release number within that epoch. Every build tag gets its own version number.
The Verity language uses a CalVer system, however: {YEAR}.{COUNTER}, where {YEAR} is the gregorian year of the release, and {COUNTER} is the release number within that year.
-
Args parser
-
Lexer
-
Parser
-
Semantic Analyzer
-
Lowerer
-
Integration with LLVM
This project (VerityC, the C compiler implementation of Verity) alongside verity's specification is licensed under MIT. See more
