Introduction
The reference for the implemented Sarlin language.
Sarlin is a statically typed language that compiles through LLVM to a native executable. Its syntax is explicit, semicolon-free and centred on classes assembled from reusable defines.
main.sar
#### A complete Sarlin program.
func greeting(name string) string {
return "Hello, " + name
}
func main() {
local const name string = "Sarlin"
print(greeting(name))
}Using this reference
These pages document behaviour supported by the current compiler. Start with the Getting Started guide to build a program, then use the language reference for individual features.
Source files and projects
Sarlin source files use the .sar extension. A file can be checked independently. In a project, every .sar file below the project'ssource/ directory is compiled as one program. Classes and defines are project-wide and require no import statement.