An over-engineered multi paradigm (toy) language that comes with its whole ecosystem. The language will have many implementations; I just want to learn how everything works.
// Functions
function fibonacci(number){
if (number == 1) return 0;
if (number == 2) return 1;
return fibonacci(number - 1) + fibonacci(number - 2);
}
// Classes
class Rectangle{
constructor(length) {
this.length = length;
}
getArea() {
return this.length ** 2;
}
}
// Inheritance
class Cube extends Rectangle{
constructor(length, height) {
super(length, length);
this.height = height;
}
getVolume() {
return this.getArea() * this.height;
}
}
// Variable Declarations
let cube = new Cube(fibonacci(10),fibonnacci(11))
// StdOut
print(cube.getVolume)Planned Language Implementations:
- Interpreter
- ByteCode-Interpreter(VM)
- LLVM
Planned components:
- Linter
- Formatter
- Minifier
- LSP (maybe)
- Implement arena allocator.
- Implement compact-str and optimized span.
- Implement diagnostics system.
- Implement let statement parser
- Implement const statement parser
- Implement binary operations
- Implement control statments
- Implement function declarations
- Implement return statements
- Implement array declarations
- Implement function call expressions
- Implement unary, unary update and logical expressions
- Implement while loops
- Implement break and continue
- Implement member expressions
- Implement class related expressions
- Implement binary operations
- Implement logical operations
- Implement environment scopes
- Implement variable declarations
- Implement if statements
- Implement functions
- Implement return statement
- Implement function calls
- Implement scoped environment
- Implement assignment expressions
- Implement while statement
- Implement unary operators
- Implement sequence expressions
- Implement update operators
- Implement class expressions
- Implement static member expression
- Implement constructors
- Implement this expressions
- Implement extend expressions
- Implement super calls
- Implement modules