A compiled object-oriented programing language implemented with ANTLR4 and LLVM-12.
class Base {
float x
string message
def Base(float x) {
this.x = x
}
def setMessage(string s) {
message = s
}
def incX() {
x = x + 1
}
def getX() : int {
return x
}
def doSomething() : int {
return x*x
}
}
class Derived <- Base {
int y
def doSomething() : int {
return x*y
}
}
def main() {
Base b = Derived()
b.setMessage("We did it!")
while(b.getX() < 10) {
if(b.getX() < 5) {
print("Not there yet...")
} else {
print("Keep going!")
}
b.incX()
}
print(b.getMessage())
}
Statically typed.
Weakly typed.
Objects are passed by reference.
Built-in types: int
, float
, bool
, string
- LLVM-12
- CMake
cmake CMakeList.txt
make
./lemur source_file | llc -o out_name
AST class hierarchyantlr parser and lexerAST builderhook up llvm backendunit testingstring supporttype infrastructurebetter scoping- advanced OOP concepts
- garbage collector
- JIT support