- Core Syntax:
- Arithmetic operators:
+ - * / - Comparison operators:
== != < > <= >= - Logical operators:
&& || ! - Operators precedence:
a + b * c,(a + b) * c,a + (b * c), etc...
- Arithmetic operators:
- Type System:
- Primitive types: integers, booleans, strings
- Functions (
fn) and closures
- Control Flow:
- Conditionals:
if/elsestatements - Code blocks with
{ } - Return
return
- Conditionals:
- Statements
let
- Built-In Functions
- Function
lenfor arrays and strings
- Function
- Implemented basic lexer and parser
- Implemented basic AST evaluation
- Implemented errors handling
- Source line and symbol position tracking for errors output
// Factorial function
let fact = fn(n) {
if (n <= 1) { return 1; }
return n * fact(n-1)
};
fact(5);