Language reference
every statement ends with bro. block-opening statements end with bro too. blocks close with end bro.
Statements
| What | Brolang |
|---|---|
| Variable declaration | sigma x = 10 bro |
| Assignment | x = x + 1 bro |
| Function declaration | rizz add(a, b) bro ... end bro |
| Return | gyatt a + b bro |
| While loop | skibidi x > 0 bro ... end bro |
| If / else | if x > 0 bro ... else bro ... end bro |
| Logical NOT | bruh x |
| Comment | brainrot this is ignored, also // and # |
Values
sigma n = 6_7 bro # number, equals 67
sigma s = "locked in" bro # string
sigma b = true bro # bool
sigma arr = [1, 2, 3] bro # array
sigma nothing = null bro # the void
Truthiness: false, 0, "",
null, and empty arrays are falsy. Everything else is
truthy.
Operators
| Category | Operators |
|---|---|
| Arithmetic | + - * / %, unary - |
| Comparison | > >= < <= == != |
| Logical | and, or (short-circuit), bruh (not) |
+ adds numbers, or concatenates when either side is a
string. Division or modulo by zero raises a runtime error
(bro is cooked).
Keywords
| Keyword | Meaning |
|---|---|
| sigma | declare a variable |
| rizz | declare a function; as an expression, rizz(...) calls the string-conversion builtin |
| gyatt | return |
| skibidi | while loop |
| if / else / end | conditionals and block closing |
| bro | statement terminator |
| bruh | logical NOT |
| and / or | logical operators |
| brainrot | line comment |
| null | the void |
| true, false | the truth |
| based, no_cap, bet, W | also true |
| cringe, cap, L | also false |
Functions
rizz fib(n) bro
if n <= 1 bro
gyatt n bro
end bro
gyatt fib(n - 1) + fib(n - 2) bro
end bro
print(fib(10)) bro # 55
Functions are not first-class values yet; they live in a function table and are called by name. Recursion works. Each call gets its own scope, and assigning an outer variable mutates it in place.
The REPL persists variables and functions between lines and keeps
prompting until you close open blocks:
bro> sigma x = 10 bro
bro> print(x) bro
10
bro> exit bro
later bro